Re: Cleaning Debian Filesystem...
On Sun, 15 Jun 1997, Chris Jason Richards wrote:
: Has anyone come up with a decent way to audit a filesystem... so the admin
: can wipe out tons of stuff that is only partially installed or not
: removed completely, etc. ?
:
: I know when I remove some debian packages usuing dselect, it usually
: throws tons of messages like "can't remove /blah/bing/bang/" which scroll
: by too fast. In the end, it seems like I have crap just sitting around
: everywhere.
:
"dpkg --audit" is supposed to check what packages are only partially
installed, but i have yet to try it while there was a problem on my
system.
this might be a good start at finding files dpkg does not directly manage,
but keep in mind that symlinks and config files are not listed in the
/var/lib/dpkg/info/*.list files.
cat /var/lib/dpkg/info/*.list | sort | uniq > /tmp/dpkg.list
locate "*" | sort > /tmp/locate.list
diff /tmp/dpkg.list /tmp/locate.list
the most interesting part is finding out what dpkg thinks is installed,
but is not really on the filesystem. (a good way to detect a probably
broken package)
also... a sure fire way to clean up some of the config files dpkg has
replaced is to look at the list generated by 'locate "*.dpkg-*"'.
of course have updatedb configured to ignore things like /home and /tmp
and /var/spool/news (if you run a news server), and maybe /dev. Also if
updatedb does not run automatically from cron somewhere, run it before
using the locate program for any of this.
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: