by eingaeKaiy8ujie · 5y ago · 0 comments
There is only one issue I had with Debian: I don't like/understand how it's package manager handles unneeded software.
For example:
1. I installed Debian with the Gnome interface.
2. Decided to try KDE, installed it alongside Gnome.
3. Deleted KDE. But then there still were lots of KDE-related packages left. I tried `apt autoremove` and some other stuff, but no matter what I couldn't figure out how to easily remove all unneeded packages and return to the previous state.
This is likely because by default Recommends and Suggests both prevent autoremovals and there are probably some circular depends/recommends/suggests loops preventing removing things. The APT::AutoRemove::RecommendsImportant and APT::AutoRemove::SuggestsImportant options can be used to disable this behaviour, so you could try the Suggests one first. Adding the Recommends one would autoremove lots of other stuff too though.
Another thing you could do next time is list all packages (apt list) before and after, then diff the lists to see what was added/removed/upgraded and manually revert that.
[1] https://www.debian.org/doc/manuals/debian-reference/ch02.en....
It also distinguishes config from other files. By default, it will keep modified config files when you remove packages. That way you don't accidentally delete the custom web site definitions that took you hours to create. You can use --purge to override this conservative behavior.
Debian's packaging system isn't the simplest, but I find it to be reliable, good at dealing with edge cases and failures, and extraordinarily well documented. It's part of why I switched to debian-based distros well over a decade ago.