[NEW IDEA] Automatic removal of dependencies

Ola Thoresen redhat at olen.net
Sat Apr 22 15:01:51 UTC 2006


I have this little snippet as ~/bin/rpm-listunused

#!/bin/sh

rpm -qa | while read pkg
do
    rpm -ql $pkg | perl -ne 'chomp; next unless -f $_;
                             $e=1; if (-A _ < 6*30) { $e=0; last }
                             END {exit (!$e)}' && echo $pkg
done



It will simply list all packages where no files have been accessed the
last 6 months.  I believe it has been posted here before (or I might
have picked it up somewhere else), but anyway something like this would
probably more helpful than only looking at the dependencies if one is
trying to determine what packages can safely be removed.


Rgds.


Ola Thoresen





More information about the devel mailing list