You are not logged in.
Hi there,
Due to the filesystem on root being almost full I will have to clean up the list of installed packages. No I am wondering if there is any way to list packages in descending order of their last usage. By that this would give me an insight on which packages and programs have not been used for a long time and thus could be uninstalled.
Is this possible with pacman by default or are there any scripts out there that would allow me to list packages according to their last usage?
Thanks!
Offline
No such timestamp exists. You should simply show all explicit packages and filter out groups like base, base-devel, xorg and your desktop, then see what you don't need anymore.
Offline
Also check /var/cache/pacman/pkg for doubles. cacheclean in the AUR can do it for you.
Offline
Depending on your mount options, you can do something like:
stat /usr/bin/* | awk ' /^ File:/ {n=$2} /^Access: 2/ {d=$2 ; print d "\t" n}' | sort -rn
I'm aware that that will only search /usr/bin, I'm just giving you a starting point. This will give you a list of files not recently accessed, from there you can find which package owns that file and remove it. However note that often you use a package in other ways. For instance the last item the above gives me is:
2012-08-22 ‘/usr/bin/aspell’
However, I know that I'm using the aspell libraries, even if not the executable directly.
Hmm.... Looking at my own results, /usr/bin/id3 shows is as late 2012 when I know I've used it more recently. Ah, I mount the root partition with noatime. Yeah, as I said at the start, this depends on your mount options.
Offline
$ grep "\[PACMAN\] installed" /var/log/pacman.log
Edit: Nevermind, "last usage" not "last install"
Last edited by jakobcreutzfeldt (2013-06-25 09:36:39)
Offline
Thanks for your replies. I especially like your idea SidK!
Do you see any possibility to also taking into account indirect usage of files, such as mentioned with aspell libraries?
Not using this method, no. You're starting to sound a little like a help vampire, have you done any of your own research?
Going back to the problem (as opposed to trying to implement your propsed solution); have you tried listing pacman's packages by size and seeing if you can get any quick wins by removing large ones?
Offline
I used a similar oneliner to SidK's but for all files, not only binaries: logs, cached content (e.g. package cache) etc. can take up a lot of space too.
Offline
pacsysclean will list packages in order of size. Maybe there is a few big packages that you don't use anymore.
Offline
No such timestamp exists. You should simply show all explicit packages and filter out groups like base, base-devel, xorg and your desktop, then see what you don't need anymore.
Double this. If in looking at a complete list of explicitly installed packages you can't tell what you do and do not use, you installed way too much in the first place; having to uninstall them piecemeal is your lesson in keeping things clean.. You can always use "pacman -Si <package>" to view info on a package, and "pacman -Rncs" to see what packages might be pulled out should you uninstall something.
Offline
Thanks for all your solutions. I really appreciate it. I ended up with the combination of cacheclean and pacsysclean which allowed me to identify the largest packages, manually selecting which ones I do no longer use, and purging the cache very nicely.
Offline