You are not logged in.
Suppose, ahem, that "someone" had strayed a bit from The Arch Way and now and then had installed packages just because well.... they sounded useful or simply really interesting and surely this someone would find the time to try them out and see how they tick. Sometimes the will is weak and a good pkgdesc is just too tempting.
Is there a good way for this someone to identify and remove packages that are going unused? I don't just mean packages that no longer satisfy a previous dependency, I also mean packages with executables that just aren't being used.
Ultimately this someone probably should audit the full list of installed packages. Is there a good way to get that process started by generating a list of non-essential packages that might be going unused?
Last edited by khouli (2015-06-20 11:26:17)
Offline
In general: No. In the end it's only you who defines what "unused" means.
Take a look at https://wiki.archlinux.org/index.php/Pacman_tips. There might be some useful hints. I recommend using pacman -Qe and stepping through this list step by step. As long as you do not break your system you can easily reinstall any package you miss later.
Offline
When I install packages I want to test, I add their package names to my notes. Then it's just a matter of e.g. weekly revision and running 'pacman -Rns <paste package list here>'.
Offline
You could watch the file access in /usr/bin for a week, then exclude that list from the directory tree and analyze the packages of the remaining ones.
You can do that with inotifywait, somewhere in early boot start as root:
find /usr/bin -executable -not -type d | inotifywait -m --fromfile - -e access >> /var/log/binaccess.log
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
See also https://bbs.archlinux.org/viewtopic.php … 5#p1292205
Edit: I think if you install a new version of th package, it updates the date, so if you update a package you don't use, it will show up as "recently used" anyway.
Last edited by karol (2015-06-16 16:03:27)
Offline
Thanks for dredging that up Karol, I have a revision to SidK's command that only checks binaries from explicitly installed packages that are not required by any other packages:
stat $(pacman -Qetlq | grep "^/usr/bin/[A-Za-z0-9]") | awk ' /^ File:/ {n=$2} /^Access: 2/ {d=$2 ; print d "\t" n}' | sort -rn
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
stat can format output, so e.g.
stat --format "%n %x" /usr/bin/* /usr/local/bin/* | awk '{ print $2 " " $1 }' | sort -nr
could be used instead of the original (SidK's) command. Feel free to incorporate it into yours.
I've noticed that /usr/bin/vendor_perl/ - a directory - was included too.
Offline