> > I mean *all* the cruft -- old modules and config files, deprecated binaries
> > and man pages, even old shlibs if it's safe.
> 
> I agree with you, and I was giving an example that a lesser form of
> this is already required during the upgrade.
> 
> It would be VERY useful if someone could develop a script to do this
> (e.g. install various versions of 4.x and do an upgrade, then collect
> a complete list of all the stale files).

#=========================================
#!/bin/sh

installdirs=    /bin /sbin /usr/bin /usr/sbin /usr/libdata /usr/libexec /usr/include 
/usr/share /usr/lib

for dir in ${installdirs} ; do
        find ${dir} -type f -ctime +1 -delete
        find ${dir} -type d -empty -delete
        find ${dir} -type l -delete
done

# 4.x -> 5.x only:
# rm -rf /kernel* /modules*

cd /usr/src && make installworld
#=========================================

The second "make installworld" is to repopulate your lib/compat/ dirs,
rebuild the hierarchy and to catch files (groff support IIRC) that
this erroneously deletes.

I do this pretty often.

M
-- 
o       Mark Murray
\_
O.\_    Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to