[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [NEW IDEA] Automatic removal of dependencies



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]