I hate apt
Let me start this post by writing how much I thank the Ubuntu
, Debian
and therefore also the apt
ecosystem to be there in my life.
It was there when I operated VPS back in 2010, it excited me in 2013 when I used Ubuntu as my main Desktop Operating System, and therefore it prepared my path to become a Software Developer and Founder before I even earned my first dime.
But with time you learn more. In my case I learned how other operating systems deal with package management and compared to that and recent events in my life, apt
seems to have the worst UX I encountered.
apt
is thenpm
of the OS world
I would say, because apt
is popular and everywhere, but one of the worst package managers you could choose. This is even unfair to npm
because in my eyes npm
is not as bad as people say, and the bigger problem is the culture around creating and using packages in the Node ecosystem. (But I still like bun
more)
Why I hate it?#
Well, let me tell you about my most recent problems with apt
and Ubuntu
:
Ubuntu Server Upgrade#
I upgraded an Ubuntu Server from the last to the most recent LTS version. After rebooting I had to use the recovery console from my Cloud Provider because Ubuntu removed ufw
for some reason and that caused the SSH port to be blocked.
Thankfully my ufw
configuration was still there, but many other configurations were broken, and I had to fix various software systems to get everything up and running again. (E.g. Python (had to reinstall all dependencies for my projects), PHP (some extensions like php-dom
were missing and configurations broken), …)
Ubuntu Desktop LTS Upgrade#
My girlfriend upgraded her Ubuntu Laptop from the last to the most recent LTS version. It not only removed her whole desktop environment (Unity
) and blocked us to reinstall it (so we installed XFCE
) but it also created tons of package conflicts which we were only able to resolve by manually downloading and installing the packages (because e.g. packages did depend on other packages which were not there in both LTS sources).
Pointing the sources to the last or the newest version didn’t solve it, tons of other ways also didn’t solve it. We are left with a half-broken system because the Upgrade stopped in the middle due to some random error.
Armbian Package Conflict#
This is by far the most annoying problem I faced recently. Because the firmware for my WiFi-Adapter wasn’t there in the sources for my version, I manually installed it.
This created a package conflict between my manually installed firmware package and the armbian-firmware
package. The conflict is there because armbian-firmware
says it replaces my manually installed firmware.
armbian-firmware
, in fact, does not replace my manual firmware (otherwise I wouldn’t have installed it) but that is not the annoying part.
Because of this conflict, I can’t upgrade anything. I can’t even run apt purge nodejs
to uninstall NodeJS!
I tried holding the packages back (apt hold ...
), using dpkg
or aptitude
and other ways to get around it but apt
doesn’t let me do anything until I solve the conflict which doesn’t even create any fucking problem.
Why the hell am I not allowed to uninstall NodeJS when some random package maintainer accidentally made one single wrong package definition?!
apt
behaves like a serial string of lights where when one light doesn’t work the rest also fails. It doesn’t make any sense.
Freshness of Packages#
I replaced Docker with Podman some years ago. Since then, I maintain Podman on a VPS with an older Ubuntu LTS Version.
The age of the Podman version available via the sources makes it unable to use it - because of this I wrote scripts to manually build a fresh version of Podman from source.
Podman isn’t the only package where I basically build my own package management system because Ubuntu only provides stone-age versions of Software, but Podman is a very extreme example because since the version provided in the sources, Podman has changed its network stack to what feels like 5 times.
But who does it better?#
Good question. Let me give you some examples.
Package Conflicts#
My package conflict Issue wouldn’t even cost me seconds with Arch Linux. There I know I could just ignore it like:
sudo pacman -Syu --ignore=armbian-firmware
Why isn’t this a thing in apt
? Why does one conflict mean I can’t even remove totally unrelated packages?!
Upgrade Problems#
Both LTS upgrade problems my girlfriend and I faced wouldn’t have been a topic with NixOS
. Every package would have been specified in a configuration.nix
and every configuration change would have created a new entry in the boot menu.
So we could have just rolled back to a previous version, and we would also easily see which config change would have cause which problem.
I would also argue that the rolling-release way of e.g. Arch Linux also softens these issues because you don’t have so many bigger upgrades but small, easier manageable updates instead.
Fresh Packages#
NixOS
and Arch Linux have way fresher packages and I could easily add packages thanks to things like the AUR
. Ubuntu and Debian have a stability mentality in which only old packages seem to qualify.
Summary#
apt
was an important part of my life and in becoming more interested in the Linux ecosystem but compared to alternatives it has one of the worst user experiences you could have.
For somebody which is too deep in the Debian / Ubuntu world this could be hard to understand, and I hope I can encourage people to try out the alternatives like nix
in NixOS
and pacman
in Arch Linux
.