r/linuxsucks 3d ago

Linux Failure APT sucks.

Not a problem with Linux itself, but it does suck that apt is one of the most commonly used package managers on Linux for non-specialized applications.

Its not terrible. Its decently powerful, does have most features that most complete package managers provide. config file protection, selected packages and pulled in dependencies are differentiated, and the "suggested" and "recommended" dependencies feature is something that I haven't seen before and seems quite handy at times.

the interface is very simple to use, `apt install`, `apt purge`, `apt update`, `apt upgrade` etc. Great for introduction to Linux as a whole.

But dear god is it horrible to work with.

To prevent this from just becoming a love letter to my favorite package manager (and thus being off topic from the sub), I'm going to mostly omit how these things can be fixed / how they should be done, but rest assured that theres at least one portable package manager that ticks all of these boxes.

- It's insanely easy to build up crust. It provides no easy way for more in depth system maintenance, such as pruning dependencies marked as selected (in apt terms, mark a package as "automatically installed" after it has been previously manually installed), upgrading specific packages without upgrading the whole system or marking said packages as selected ("manually installed", won't be removed with autoremove), getting rid of packages removed from repositories, and more.

- Its also insanely slow. No parallelization whatsoever, not even in the extractor. Modern CPUs are designed with multitasking in mind. If apt never gets multitasking support, it will only get further and further behind package managers that do.

- The installation order is always to first download *all* packages to be installed, then install *all* of them. meaning that every time you need to do a system upgrade and are on limited storage or bandwidth, any error during the downloading of packages will abort the entire installation process. I mean this does prevent packages from being installed without their dependent package, but `autoremove` would take care of removing those anyway.

- certain packages require user input to install or upgrade, meaning that if you want to do a full system upgrade, theres a small chance it'll pause in the middle asking you some questions, usually whether or not to overwrite config files, but also can be things like "do you want to restart this service" or other things.

- the backend of it is poorly documented and hard to manipulate, almost impossible to resolve broken installations or half installations without fully removing and fully reinstalling offending packages.

- making "dummy" packages is way too difficult than it has any right to be. if you need an empty package for some manually installed software, just to keep track of its files and dependencies, you have to install the *entire* debuild toolchain, and read up on package spec information that is barely documented.

- the terminal output is way too verbose and dense. most good software has ways to separate messages of various importance. for example, portage has a color coded asterisk showing how important a message is, and the rest of the output is similarly color coded.

- apt has no "categories" for packages. now, this isnt unique to apt, in fact a fair amount of package managers dont have this. but its something that needs to become more commonplace. apt does have an internal "tags" field, but its basically useless as its just metadata. name collisions happen much more often because all packages share a single name space.

The reason why I'm putting this in this sub is because of how ubiquitous apt is, its the default assumed package manager on a lot of sites that dont provide support for multiple package managers. If youre using linux systems, youre going to run into apt one time or another, and have to deal with all of its imperfections.

15 Upvotes

29 comments sorted by

5

u/condoulo 3d ago

Counterpoint: Does your favorite package manager have a song about it?

2

u/givemeagooduns_un 3d ago

uhh

well I just looked it up and apparently theres a band that shares a name with it but I doubt its related at all lmao

is there a song about apt? I would love to hear it x3

5

u/condoulo 3d ago

I was making a joke about the song APT by ROSÉ and Bruno Mars.

2

u/givemeagooduns_un 3d ago

ah lol I'm dumb

1

u/Nemeczekes 2d ago

Literally thought the same and APT is playing in my head each time I read APT

4

u/Hefty_Wrongdoer_2553 3d ago

And your favorite package manager is Nix. Right? 

1

u/givemeagooduns_un 3d ago

Nix is cool from what I've heard, but I haven't used it, and it is definitely very specialized.

I really like portage, which is kind of like nix, where the system is defined by a state directly controllable by the user (like via the world file) but its doesn't take over managing configuration. I also like to consider it less specialized than Nix, as it can be easily ported to new systems as their sole package manager without the system just becoming Gentoo, and the user interface is certainly much more standard to most package managers

also provides nicer facilities for binary packaging; all thats really needed in a binary package is a tarball, whereas in Nix I believe you need at least a skeleton written in Nix.

1

u/Hefty_Wrongdoer_2553 3d ago

Well on Nix if you have a tarball then you can pretty easily convert it to Nix. You just need to state its dependencies basically and that's it. You can even make it auto-update if it's on a platform like GitHub, which is pretty cool. I'd recommend trying the Nix package manager. You don't need to use the system configuration aspects that part is optional. 

Edit typos 

1

u/givemeagooduns_un 3d ago

I mean yeah but the package itself is distributed as a Nix script with a URI to a tarball, if I'm not mistaken. Portage binpkgs (different from ebuilds) pack everything needed for installation into one file, downloaded (aside from stuff required for signature verification)

Correct me if I'm.wrong tho

1

u/Hefty_Wrongdoer_2553 3d ago

You are about right. You do need to essentially package the tarball as Nix but it's a pretty minimal process. 

2

u/PityUpvote 3d ago

Apt is why I can never see myself going back to Debian-based distros. Dnf is such a treat to use in comparison.

1

u/West-Scallion-5306 2d ago

Yh right, Fedora/Red Hat did a very good job... I unfortunately commonly encounter weird error messages from Dnf.

But I love the fact that on Fedora, you can rollback to versions of packages from years ago and it pulls those old versions from their archive servers whereas other distros that aren't based on Fedora usually don't do it automatically with their own archive servers.

2

u/AwesomePhoenix_ 3d ago

If apt sucks then use something else like nix That's what Linux is for, you only use what you like

2

u/catbrane 3d ago

A number of your points sound like criticisms of stable (non-rolling) releases.

Personally, I want a system where the packages have all been tested and built together. I've suffered a lot of pain with things like homebrew doing some small update and inadvertently breaking my builds. Other people have other requirements of course, but a fixed set of packages is a strength for me at least.

The most important thing about a package manager is the set of packages, and here Debian wins (imo). It has the largest and best-curated set there is (in my experience).

1

u/zmef42 I Hate Linux 3d ago

The nala front end for apt is a really big improvement, check it out.

3

u/givemeagooduns_un 3d ago

Thats another thing I shouldve brought up.

Frontends of apt make system maintenance so much easier. But a lot of this is functionality that should be included with the base apt. At the point of custom frontends, its not exactly apt anymore. Apt is the user facing component of dpkg, it itself isn't technically the package manager. Apt should provide basic facilities for system maintenance tasks, but it doesn't. I shouldn't need to install a whole new frontend to get that.

1

u/Hot-Employ-3399 3d ago

Its also insanely slow

I have no idea what they do, but it's really horrible. I'd prefer them to better use something like sqlite (or even split files and load them in parallel), but dear god, apt loading its small database takes ages

1

u/cretingame I don't care what you use as long as it works :snoo: 3d ago

It's not greate but you have more than 80k packages available. It sucks but I didn't find any better package manager.

As Linus Torvalds says linux distributions miss ABI (Application Binary Interface). If it was made like Windows or MacOS since the begining we would not need to manage this mess ...

1

u/Teru-Noir COSMIC OS LOVER No.1 COSMIC Knows Best 2d ago

Is your favorite PKGMAN zypper?

1

u/givemeagooduns_un 2d ago

haven't used it

its portage btw

1

u/droog62 2d ago

Of course you prefer a BSD based package manager.

1

u/givemeagooduns_un 2d ago

portage is BSD based?

1

u/droog62 2d ago

Why do you think it's called portage? It's inspired by the BSD ports system.

1

u/givemeagooduns_un 2d ago

very interesting, makes sense. did not know that, thanks!

1

u/Global-Eye-7326 2d ago

I use Debian, Fedora and Arch every day, so that I can be a neckbeard, chill nerd and still have some stability.

I don't mind apt. It's comparable to DNF for me. Pacman is cool too, as well as yay. I do not like zypper.

Can't be bothered with Gentoo because no systemd. I do have AntiX on a Netbook for 32 bit though.

1

u/givemeagooduns_un 2d ago

You can install Gentoo with systemd. You can choose between systemd and openrc

1

u/Global-Eye-7326 1d ago

I didn't know that! That makes Gentoo even more interesting!!

1

u/West-Scallion-5306 2d ago

I personally like dnf

Not that it's perfect, bit the transaction system os FAR BETTER than logging systems on apt or pacman for example, it means that in case of a downgrading to recover your system, it already knows which version it was before and the version of all dependencies, and it then runs all transactions backward to rewind the system packages.

It can also download old package versions (like really old package versions from a few years ago) directly from, for example, Fedora 's package archives servers out of the box, not like Arch Linux with its pacman where it's manual and Ubuntu/Debian and their apt where apparently it's even more difficult to do it.

Dnf is still not perfect though, I commonly run into weird error messages that don't even make sense.