3 ms·
Long live Debian
by klysm 3y ago
Long live Debian
- behnamoh 3y agoDoes `apt` handle packages as cleanly as `dnf` and `yum`? Last time I tried `apt`, it would uninstall apps without cleaning after itself.
- kstrauser 3y ago“apt purge” takes no prisoners.
- npteljes 3y agoApt 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.
- 8organicbits 3y agoDo you remember which package, or if it was an official Debian package vs third-party? The former is usually pretty well written. Do you have a use-case where packages are regularly uninstalled? I usually only install.
- bityard 3y agoIt will not automatically remove dependencies that were installed along with a package when that package is removed. I'm guessing this is due to some historical ideology about how `apt-get` was intended to function. I just typically run `apt remove foobar && apt -y autoremove`. There is also nala, which _does_ automatically remove dependencies when you remove a package: https://github.com/volitank/nala https://github.com/volitank/nala
- dylan604 3y agoIs it aware if another package is using the same dependency, so it only removes the dependency if it is not being used by anything else?
- sigio 3y agoYes, that's what 'apt autoremove' does... remove packages that were installed as a dependancy, but are no longer needed because packages using it have been removed. However, the package could of course still be used by unpackaged software or local scripts.
- deleted 3y ago[deleted]
- Calzifer 3y agoaptitude also auto removes dependent packages and is in Debian stable. It has also a useful 'aptitude why package' to say why a package is installed and a nice TUI (which is optional; for the most part it works very similar to apt).
- stonogo 3y agoNowadays you can just pass --autoremove to `apt purge <package>` and it will.
- deleted 3y ago[deleted]