4 ms·
Apt purge cleans up user config files after a package, but not package dependencies. For complete package removal, apt autoremove is needed even after apt purge
by npteljes 3y ago
Apt purge cleans up user config files after a package, but not package dependencies. For complete package removal, apt autoremove is needed even after apt purge.
- kstrauser 3y agoTrue, but its output suggests that you do that and tells you what it would autoremove.
- npteljes 3y agoIndeed. So it not only doesn't do a complete job, it "takes prisoners" too. Taking no prisoners would mean it's aggressive, relentless, thorough, and apt is neither of these, it's a solid, professional tool, with some legacy baggage, but at least it's friendly and discoverable about it. In the current thread, I'm only nit-picky about this, because OP said "Last time I tried `apt`, it would uninstall apps without cleaning after itself". To which to suggest that apt-purge does clean up after itself is incorrect. It does some additional cleaning-up, but it doesn't do a complete cleaning-up. That being said, of all the package managers I tried, I still like apt the best. I feel like it's the most straightforward and user-friendly of all of them.
- behnamoh 3y agoSo apt uninstall -> apt purge -> apt autoremove That looks like an unnecessarily long process to safely remove a package. Why isn't that the default behavior on Debian?
- Calzifer 3y agoYou can skip the uninstall if you use purge. And aptitude (alternative package manager) automatically removes dependent but not required anymore packages when removing/purging a package.
- oynqr 3y agoThere's also autopurge, which can take arguments of additional packages to purge, like autoremove. So you only really need _one_ command.