Over time the amount of disorder in any system increases, unless some effort is spent reducing it.
Packages often clutter linux systems because there's no easy way to list
unwanted packages, that's what pactropy does.
Given a list of wanted "essential" packages, pactropy finds explicitly
installed packages that are not in that list.
For example:
packages:
- base
- linux
- zsh
- neovim
- less
- sudoIf you run pacman -Qe, that will list "neovim", but pactropy will not,
because it's marked as "essential" (you actually do want it on your system).
There are other ways of displaying potentially unwanted packages, for example
using diff with an ordered list of packages, like
declaro does. But this is not very
convenient.
Copy the script anywhere in your $PATH and make it executable (e.g. ~/bin).
Create a list of your essential packages in ~/.config/pactropy/, for example
the following essential.yml:
packages:
- base
- linuxExecute the pactropy command.
Compared to other methods, pactropy has several advantages:
- Standard YAML format (including comments)
- Automatically sorted by size
- Support for groups
- Deep dependency checks
- Multiple lists of packages
- Single script
- Check install reason changes