Hacker News new | ask | show | jobs
by InfiniteRand 2075 days ago
I really think Linux should make it harder somehow to uninstall critical parts of your operating system.

I'm sure it might not be easy to work out a mechanism for this that would not add friction for those who need to swap out large components of their desktop experience, but I personally think this is one of those things that sometimes really scares people about Linux (along with rm -Rf /)

Every couple years I find myself not paying enough attention to the apt update text and then I end up swearing off any interaction with Linux for months.

2 comments

I really think Linux should make it harder somehow to uninstall critical parts of your operating system.

Yes. This was one of the things we had to polish way back in the first Linux boom when I was working at Lindows. We got a report from QA that "when I uninstall this random thing called dpkg I can no longer use the app store". After the lead dev managed to collect himself from off the hallway floor (the only literal ROFL I have ever seen), everyone realized that yes, you should be prevented from uninstalling the core software.

Why would apt uninstall things automatically? I’ve never noticed pacman doing that but maybe I’m lucky
Sometimes a newer version of package A will declare that it conflicts with package B. Maybe package C depended on both before the conflict was added. Then the package manager might find that the only way to resolve all conflicts is to remove C, which then auto-removes everything C depended on. Maybe C happens to be the "kububtu-desktop" package.
That seems like a poor design in apt. Does any other package manager allow such a thing? I know Arch's pacman has no autoremove - you have to gather a list of unneeded packages then remove them as a separate step. And Gentoo's emerge builds a dependency tree rooted in the @world package set, so if kde-plasma/plasma-meta is there it will never be removed by an automatic depclean.
apt does try to keep track of unneeded packages/dependencies though - and will suggest you remove them with apt autoremove. This should always be safe... Unless a package is missing dependency information (has a packaging bug).