Archlinux - Clean Packages
Archlinux is an excellent Linux distribution, featured by light weight, flexibility, keep it simple and stupid (KISS), as well as well-documented wiki. Therefore, I have been using it for so many years. Unavoidably, there are some packages accumulated and remained after numerous package related operations, e.g., installing, removing, updating, etc. This post aims to clean the packages.
For each installed package, following command can keep the latest version and remove all the historical versions.
pacman -Scc
For each isolated (not in use) package, following command can remove them automatically.
pacman -Qqdt | pacman -Rs -