Since I switched my favorite distro to Gentoo I have been very familiar with the following pattern for installing and removing packages:
- Install a bunch of applications that do pretty much the same thing to try them out:
emerge <package>. This command installs the package, and mark the package as explicitly installed.
- Do try them out and remove those I don't like (and hopefully keep one or two that satisfy my needs):
emerge --deselect <package>. This command removes the package from the list of explicitly installed applications, but does not uninstall the package.
- Finally remove everything that is not required on my system:
emerge --depclean. This command removes all packages that are (1) not a system package, (2) not installed explicitly and (3) not a dependency of those two.
- And optionally check that all package dependencies are OK:
revdep-rebuild. This command checks all dependencies and reinstall broken packages.
Once in a while I would look at the entries in
/var/lib/portage/world (the list of explicitly installed packages) to review the top-level applications that I use, and remove those that I don't use anymore using the commands in step 2, 3 and 4.
Now that I'm trying to learn Arch, I wonder if I could use the same strategy with Pacman? Or another strategy that can keep my system clean of unused packages?
Note: the Pacman Rosetta helps a lot in quickly understand things, but I could not figure out Arch's equivalent of the
pacman -Qe is said to do it, but it contains things that I swear I haven't explicitly installed... Anyway please answer this question in terms of strategy (with command examples, of course :)