How to safely clean out /lib, /usr/lib?
Matthew Dillon
dillon at apollo.backplane.com
Mon Oct 11 09:01:32 PDT 2004
:=20
:installworld and deleted all commands more than a month old or so, the=20
:logic being that any commands not updated by world are remnants that can be=
:=20
:purged. Is that a reasonable assumption?
:=2D-=20
:Kirk Strauser
I would also check the last access time of the libraries in question
as a failsafe. (note: the actual libraries, not the softlinks whos
access times are not updated by the system).
cd /usr/lib
ls -ltua
(this assumes you don't use 'tar' or 'cp' to backup your system, which
would skew the results, and that you haven't already blown it by doing
something right aweful in /usr/lib to open and read all the files :-).
This also assumes that you are not using the 'noatime' mount flag for
/usr).
You can see whether a library is actually being used or not by looking
at the last-accessed date (ls -u). Or maybe run all your favorite
applications first, exit them (so mmap accesses are updated properly),
*then* check the last accessed dates on the libraries.
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the freebsd-current
mailing list