Archlinux Cleanup
2020-12-17
If one uses a system for a while, it tends to clutter.
Half-way into spaghetti-piping this , I started reading more of pacman's man page. Things are way easier to achieve than this:
toe@detritus2 ~ % pacman -Qq | pacman -Qi - | grep -E "^(Name|Install (Date|Reason)) | sed ..."
List unneeded packages (names only, dependency packages, unneeded):
toe@detritus2 ~ % pacman -Qqdt
aalib
abcde
acl
(...)
Take that output, feed it into remove command, 10 packages at a time for better overview:
toe@detritus2 ~ % pacman -Qqdt | head | sudo pacman -Ru -
[sudo] password for toe:
checking dependencies...
Package (10) Old Version Net Change
akonadi 20.12.0-1 -2.79 MiB
c-ares 1.17.1-1 -0.43 MiB
celt0.5.1 0.5.1.3-5 -0.13 MiB
ceph-libs 15.2.6-4 -65.81 MiB
gamin 0.1.10-9 -0.17 MiB
gconf 3.2.6+11+g07808097-5 -6.59 MiB
gegl02 0.2.0-8 -2.52 MiB
geoip 1.6.12-2 -0.28 MiB
glew 2.2.0-2 -2.75 MiB
glusterfs 1:8.2-2 -18.62 MiB
Total Removed Size: 100.09 MiB
:: Do you want to remove these packages? [Y/n]