On Tue, 2003-02-18 at 00:43, Leif Mathis Gaup wrote:
We could/should ask for SuSE to apply something similar to this for YaST:
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
Keep in mind that I didn't write this, and one should probably see over the lists output. It is though a good exercise to try and understand this.
You list all packages where none of the files have been accessed in the last 180 days I'm not looking for packages that haven't been used for 180 days. Instead I'm looking for packages that no other packages depend on. That means they can be uninstalled without breaking dependencies. Since rpm checks dependencies when packages are installed and uninstalled the needed information should already be in the rpm-database. A script should be able to perform this. Unfortunately I have no clue about that.
Fabian