Red Hat Bugzilla – Bug 2345
Inappropriate "cannot remove DIR - directory not empty"
Last modified: 2015-01-07 18:37:00 EST
I encounted this when upgrading from gimp-1.0.1-2.i386.rpm
cannot remove /usr/lib/gimp - directory not empty
I get it from time to time with other packages too.
The message is inappropriate because /usr/lib/gimp is
actually used by the new package. However it is not
explicitly listed by the package: the directory
/usr/lib/gimp/1.0 is listed, and /usr/lib/gimp is implied by
I suspect the previous version did have /usr/lib/gimp in the
directory list, hence the message.
Suggestion: Don't try to delete directories whose existence
is implied by other directories from another package. One
way would be to add entries for those implied directories to
the database, with a flag to say they're implied.
Rpm cannot remove directories that are not empty while attempting to
remove a package. Furthermore, the bug is often in the already
released package so we cannot always repackage to work around