What is in your opinion the best package manager?

I have been using linux for about 2 years now and I have enjoyed every second of it. What in your opinion is the best package manager the linux community has ever offered to us? dpkg, apt, yum, pacman, xbps, zypp, nix, guix, portage, 0install and other tons of them that are out there.

@doodie
151Y

I’ve been using Nix on NixOS for a couple of years now, can’t imagine going back.

@cronjob
71Y

Yes! Nix is great, as is NixOS. I’m looking to make the plunge this weekend on my daily-driver.

@Czernobog
creator
51Y

I always wanted to try nix. I am a bit busy for now but once my schedule clears up I will definitely try it out!

@Atemu
11Y

It won’t stay clear for long when you start using it ;)

@marmulak
111Y

flatpak all the way

@Czernobog
creator
61Y

If this comment was on Reddit, it would’ve been downvoted to oblivion lmao

@Doug
41Y

I’ve never used flatpak or snap.d, what advantage do they have over normal apt or dnf?

@marmulak
121Y

Well it’s kind of hard to explain so I hope I do a good job, but package managers like deb and rpm often have packages that involve a complicated set of dependencies and way of handling files that’s tied into the base system. What flatpak does is it brings its own environment separate from the system it’s running on, so like any flatpak program could run on any system provided some basic conditions are met like the system is Linux and there’s an X server running.

Packages ought to be statically linked and have things they require bundled with them, but they can depend on a “platform” like “Gnome 3.36” or “KDE” that flatpak also provides, so the things most programs rely on flatpak does supply outside of the package itself.

Additionally flatpak’s update mechanism is ostree (I believe), so even though it might have large packages, updates to them are handled at a more fine-grained level, so the whole package doesn’t get updated just the files that changed get updated.

So considering some compromises overall, yes it takes up more space, but not too much more space, it updates fast and reliably, and the end result is that you get packages that are basically just end user applications completely bundled and compatible with nearly all Linux distros. The package is the same, doesn’t care if it’s running on Ubuntu or Fedora or Arch or Suse or…

So anyway yes it has its drawbacks, but I use it on Fedora and it works well for specific things that I choose to use it for. I don’t use it for everything. (I don’t think it’s designed for that.) It is useful in some scenarios, like some closed-source apps (Skype, Anydesk, Spotify, Steam). You push a button and it installs. No hassle. If the software has funny or outdated dependencies, you’re taken care of. Software vendors can choose to provide their application as a flatpak only and it “runs on Linux”, so that’s all they have to care about, not having to maintain a package for each individual distro. For some particular projects that choose flatpak, you get the latest updates direct from the project itself. (In my case, Gajim is a newer version on Flathub even than on Fedora itself, some good projects like Veloren use it.) For the end user it’s zero effort, though I heard it’s strange or unique to package for so for projects/vendors it’s an investment.

It seems to work well for games and desktop applications. It’s not going to handle system services and OS-level stuff, rather it’s more user-oriented. Something else I didn’t mention is that flatpak is supposed to sandbox the apps so they often run contained, but many apps need to be able to access files in t he user’s home directory anyway. I’ve heard the sandboxing criticized before, but for what I use it for I’m happy with it. It offers some things my distro doesn’t, and many things it does.

Unfortunately I don’t have much experience with snap. I tried it before once on Ubuntu and it seemed OK but for me at the time it appeared intolerably slow for some reason. I actually switched this machine from Ubuntu to Fedora in part so that I could use flatpak, and I feel it was worth it. For some reason Flathub had more packages I wanted than Snap did. Also keep in mind flatpak’s deal is it’s distro-independent, but I heard snap is basically an Ubuntu-only thing. I don’t know.

Also it’s worth pointing out that flatpak is not alone in bringing its own everything. guix does that too, so you could install and run guix alongside any distro. I’ve run guix on Fedora too but it wasn’t worth it really, although guix system distribution is so cool.

@Doug
31Y

Thank you for the informative answer! I might try to take advantage of this once I am able to install Fedora on my current laptop.

Adda
010M

This is really a nice explanation. Again, I know a little more now. Thank you for that.

@TheMainOne
7
edit-2
6M

deleted by creator

@marmulak
4
edit-2
1Y

I guess that goes along with the “hard to learn/use” for package creators. I have come across a couple packages that seem to do the packaging wrong, like Delta Chat recently updated to the tune of 500 megabytes, and I already had it installed! Most apps when they get updated download a few kilos here, a few megs there, but when I complained about it to the devs their response (on more than one occasion) was something like, “Well that’s just how Flatpak works.” I suspect though they’re doing something wrong and their packaging process could somehow be improved.

@aeroplain
8
edit-2
1Y

deleted by creator

@adrianmalacoda
8
edit-2
1Y

I’m very fond of Guix for a few reasons:

  • functional package management. Every package in the Guix store is in its own isolated directory (identified by the hash of that package + its dependencies) and every package knows where its dependencies are in the store, so you can have packages that depend on conflicting versions of libraries, for example.
  • transactional system upgrades, and ability to roll-back to a previous version of the system if an upgrade goes wrong somehow
  • per-user package management (each user has their own set of packages that doesn’t require root to manage)
  • packages/repositories (“channels”) are declared in a programming language (Scheme; not my choice of language but a language nonetheless) and version-controlled as git repos
  • packages are built from source by default but can also be available as pre-built binaries (“substitutes” in Guix lingo) if a trusted CI server has them available. I think this is the “best of both worlds” of a binary and source based package manager (this does come with an annoying pain-point, where you don’t really know if you’re going to get pre-built substitutes when you run guix upgrade, especially as packages that are less trivial to build also end up more likely to not be available from the CI server)
  • being able to install a package from a different source (e.g. a tarball, git branch/commit) (guix install --with-source, --with-branch, -with-commit, etc)
  • the default repository adheres to GNU’s free distro guidelines, which is always (for me) a plus. That being said, there’s maybe a dozen user-created channels with non-free kernels and non-free apps if that’s your thing too.

Package Management section of Guix manual


Now, one thing I don’t like about Guix is that its unconventional approach to package management often makes building more complicated packages a challenge, because those packages have to be patched to behave properly in the Guix environment.

@pingveno
01Y

I ran into a lot of trouble with Nix and one package, Apache Directory Studio. In the end it was easier to just make a flatpak.

I don’t have any experience with Nix but I imagine you’d find similar difficulty with that package under Guix. The maven-build-system is in the works but is stuck in development heck.

@gmes78
7
edit-2
1Y

Pacman is great. It may not be the best package manager out there (I haven’t tried them all), but it’s simple, fast, and, most importantly, trivial to create packages for (which is the reason the AUR exists, and why it’s so good).

@Czernobog
creator
21Y

You should give xbps-src a try. Not exactly like AUR but definitely worth checking out imho.

@max
61Y

Portage, followed by Guix and Nix. All other managers will let you down as soon as you have special requirements.

@marmulak
11Y

Guix let me down sort of because of “special” requirements. Basically traditional software development seems to not want to work on it, so for example I needed opam for a project and just couldn’t get it to work. I did make some progress also thanks to a very helpful Guix contributor, but still ended up missing a dependency for my project and had to not use Guix.

Another terrible thing I experienced with Guix is that if I had a package installed like ungoogled-chromium then updating the system/packages was like Russian roulette of either getting a neat 50mb binary package or if it’s missing (which it was half the time) Guix tries to undertake the task of building it from source which is insane. Maybe there’s a way to make it skip building from source in that case, but instead I had to use “guix weather” to see if I could update using binary packages only and if not then postpone updating.

I use a script to parse the output of guix upgrade --dry-run to figure out what packages will need to be built, and prompt me for whether I want to build anything or just upgrade from substitutes (by feeding the list of packages without substitutes to guix package -u --do-not-upgrade package1|package2|etc). It could be easier, though.

I think this would be definite pain point for users, especially of lower-end devices, e.g. a Pinephone.

@notevenfinnwww
0
edit-2
9M

deleted by creator

@otso
51Y

i use openbsd and the package manager is pretty nice, but my favorite package manager is void’s xbps. it’s a lot like pacman, but a bit cleaner feeling imo. it also has a neat argument to list alternatives to packages

@Czernobog
creator
31Y

Currently on Void Linux. The distro can use some fixes which you have manually fix it after doing a fresh install (kind of annoying imho) but damn I won’t lie xbps is freaking amazing!

@otso
21Y

I think it works great most of the time, but networking can be a bit tedious to set up at first, but I only use it for all the cases where OpenBSD isn’t going to work so I might have missed some bugs

@ajz
4
edit-2
1Y

I’m very used to apt/dpkg since many years, it is a bit slow but I like working with it. Pacman/trizen/yay is fine. Alpine’s apk is incredibly fast.

@Kamui
210M

Same, I have mostly used apt but am getting more comfortable with pacman.

Portage gang Portage gang Portage gang.

Apt is nice too.

@Czernobog
creator
2
edit-2
1Y

I would say I am an slightly above average user when it comes it Linux and not a pro. My background is in finance and economics. Gentoo feels like something someone who’s had years of experience in Linux can use it.

I hate apt though lol. i don’t know why.

Portage

Portage is the best, but don’t forget Paludis

@Atemu
4
edit-2
1Y

Depends on what you want from a package manager.

Fast & simple? APK or pacman.

Here’s a script that sources your package definition script and creates a tarball and here’s another program that can unpack such tarballs into your system and keeps track of what file belongs to what package.
Put a bit of online repo complexity on top and that’s basically all these are.

I personally prefer pacman because it’s fast enough and the cli syntax is so awesome (-Syu pkgname is the same as 4 separate rather lengthy apt commands) but apk is even faster in my experience and works incredibly well for lightweight systems.

Complex but incredibly powerful? Nix and Guix

If you’ve never used them, they are nothing like what you’re used to. Doing them justice in explaining either requires something approaching a 280-page PHD thesis or a sentence full of hyper technical terms which require a PHD to understand.

They are very complex. Great effort has gone into these to make their ecosystems accessible to mere mortals though.
By making sensible abstractions on every level, they have gotten to the point where they can even be used similar to regular package managers (managing packages a single environment has access to imperatively) which will give you some of the benefits.
Using them to their true potential needs rethinking of how you manage software entirely though (not just software itself but also software configuration).

Nix uses its own specially crafted functional expression language while Guix is built on Guile (Scheme/Lisp) but they’re both implementations of the same ideas.
Nix has a larger community and is a lot more mature (more packages, wider support etc.) because of that but Guix has a better UI (Nix’ CLI tools are pretty scattered) and tries to bring this new way of thinking about software into more parts of your system like the init system.
Oh and Guix is a GNU project, so non-free software is not supported very well :/.

I’d highly recommend you to check out the new and improved NixOS homepage to get an idea of the cool things you can do with Nix and, to a lesser extent, Guix.

You can also install these beside your Linux system if you want to experiment. Because of the way they work, they are completely self-contained and don’t touch your actual system in any meaningful way. Nix can also be used on MacOS.

@Czernobog
creator
21Y

I have never tried alpine linux. I have read a lot about nix on their website but I did not get the chance to try it out yet. I will try out soon though. (by soon I mean by the end of this month I have an exam in two weeks lol) Honestly, nix does look very powerful. The atomic upgrades and rollbacks, multiple versions, etc. I doubt I have any irl use for this but I am definitely looking forward in testing it out.

@PureTryOut
21Y

I have never tried alpine linux.

As a dev for postmarketOS and nowadays maintainer for a lot of Alpine packages, you really should. It was a breath of fresh air for me, it’s lightweight, simple, and easy to understand.

@leanleft
11Y

what are all the packages needed to get firefox fully working.
i used alpine a for while. i remember there were some additional packages like truetype to view pages correctly. any others?

@PureTryOut
210M

Uh, I just apk add firefox and it all just works. But maybe I already have the required stuff installed because of Plasma?

+1 for Alpine’s APK. It combines the best features of apt and pacman.

Personally I don’t feel there is really one best package manager as they all have different strengths. Though my favorite is probably portage. The amount of options portage gives you is very nice and I love the way overlays work as almost a second repo you can just add.

Portage for features, pacman + AUR helpers for speed

@PureTryOut
21Y

I wouldn’t say they are the best, but I like apk (from Alpine Linux) for it’s ease of use and the speed, and Portage (from Gentoo) for it’s configurability and extensiveness. It isn’t quick though, not at all…

@Czernobog
creator
11Y

Is alpine good for installing on a machine and using it as a daily driver?

@PureTryOut
21Y

I use it as my daily driver on both my laptop and desktop, and am dogfooding my own KDE Plasma packages.

@Czernobog
creator
21Y

what does “dogfooding” mean?

@PureTryOut
21Y

Using my own packages so I see if they work, find bugs so I can fix them, etc. Not using the packages you maintain makes it a lot harder to make sure they work properly :winking face:

@ajz
11Y

Alpine Linux is not exactly focused on desktop usage (more for server and embedded ?), but it has xfce4 and gnome as options, and a lot of packages.

@PureTryOut
31Y

It’s not necessarily focussed on desktop usage, but it’s a general purpose distro; it isn’t focused on server and embedded either. I use it perfectly fine as my daily driver together with the KDE Plasma packages I maintain myself.

@Czernobog
creator
21Y

What do you mean by embedded?

@gregf
21Y

FreeBSD’s pkg manager is pretty simple to use and I enjoy using it.

@marmulak
21Y

One of my favorites too

Ephera
21Y

I’m quite fond of zypper. The output is well-formatted, the shorthand commands are easy to remember, it generally behaves as you’d expect it and it’s really damn reliable.

You can side-grade from openSUSE Tumbleweed to openSUSE Leap or back, by just replacing the repository URLs and doing a dist-upgrade. I’ve done that probably 10 times already and it only failed on me once, which was after telling me clearly upfront that it would fail, so I can’t even hold that against it.

@Czernobog
creator
2
edit-2
1Y

Have used Tumbleweed. OpenSUSE is an underrated distro imho. YaST is great. Although, imho, Zypp seems super slow BUT an update has never broken on me and yes, like you said, output is well formatted and the shrothand commands are very easy to remember! like using al for app lock ll for list lock and all. very easy to remember. Zypp is definitely in top 5 for me. (:

Ephera
11Y

Yeah, ZyPP uses a SAT Solver, so it basically does a mathematical proof that the dependencies can be satisfied. So, assuming there’s no bug in the solver implementation and dependency information on packages is correct, it cannot fail, but that’s what makes it somewhat slower than the package managers that increment versions more naïvely.

You might also still remember zypper feeling slow, because it refreshed with every command. It doesn’t do that anymore. Now it only refreshes when the last refresh was a little while ago.

@jwinnie
11Y

Definitely xbps (Void’s package manager).

  • Really fast, slightly faster than pacman.
  • You can quit in the middle of a package download and it will pick it right up when you run the command again.
  • It can show which packages you manually installed (xbps-query -l -m).
  • It can draw really sophisticated dependency graphs for packages.
  • It has a sophisticated and customizable hook system that can, for example, automatically update your EFI boot entries when you update the kernel.
  • It can automatically track dynamic library dependencies and supports partial upgrades.
@Alex1138
11Y

I use Debian/apt (dpkg), which is fine. But for sheer (not saying best, but still) “wtf is happening”, Void’s xbps is a METRIC TON OF FAST SCROLLING

@baka
11Y

kiss. written in shell and has a lot of nice features

@dl_
11Y

Not sure if it counts, but I’ve really been enjoying using rpm-ostree on fedora silverblue

@marmulak
21Y

I was playing with Silverblue in a VM a couple months ago and it really is nice. Toolbox is kind of weird, but if Silverblue meets all your needs then it should be rock-solid. Very simple system to maintain and keep clean/stable.

@dl_
21Y

I agree with you on toolbox being weird. I’ve pretty much stopped using it and instead opt for specific containers for tools I don’t want to layer or can’t find a good flatpak for.

@marmulak
21Y

opt for specific containers

Can you elaborate a little more on this? I might try doing that myself in the future.

@dl_
3
edit-2
1Y

My workflow is basically that instead of installing all dependencies for a project, I run a container with what I need that is usually removed immediately after execution.

As an example I recently wanted to compile minikube from source. To compile the project I would need to have go installed as well as make, and since I don’t have any of those tools installed to my base system I used the official golang container from dockerhub.

Compilation is then run with podman run --rm -it -v $(pwd):/usr/src/minikube:Z -w /usr/src/minikube golang:latest make which simply mounts the project and compiles it using make, and since the entire project folder was mounted in the container any binaries and other output can be found in the configured output directories on the host.

If I have any project I have to run or compile often inside of a container I can easily create an alias or function in my shell to run the podman run command for that project.

I like this workflow a lot since it keeps my host system clean, and it makes it easy for me to build projects with different dependencies with little to no conflicts. I much prefer this over toolbox since I don’t have to consider the state of my toolbox container and images are always updated to their latest version without any need to manually keep packages inside the toolbox up to date.

I might do a more thorough write up of my workflow on my blog in the future and if I’m satisfied with it I’ll probably post it here as well.

@marmulak
21Y

Wow, cool! Thanks for sharing

@april
11Y

I really like FreeBSD’s package manager, it’s just simple to use and gets the job done. Although I also really like the simplicity and complexity portage can have

@Czernobog
creator
11Y

what is the FreeBSD package manager called? I have never used any BSD based OS.

@april
1
edit-2
1Y

It’s literally just called pkg it’s pretty nice and simple to use, could probably get the hang of it in no time

@ptman
01Y

https://distr1.org/ sounds better than most traditional ones. But Nix is lovely.

@thegergo02
9
edit-2
4M

deleted by creator

@Czernobog
creator
41Y

pacman is good

Dessalines
admin
5
edit-2
1Y

pacman + yay

@Czernobog
creator
31Y

As much as like AUR, there are only 3-4 packages that I actually install from it. So, I just install it manually. It seems much easier to just download the snapshot from the website and run makepkg -si command instead of installing yay

@thegergo02
0
edit-2
4M

deleted by creator

@developred
2
edit-2
5M

deleted by creator

@dominik
0
edit-2
1Y

deleted by creator

@notevenfinnwww
0
edit-2
9M

deleted by creator

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

  • 0 users online
  • 8 users / day
  • 32 users / week
  • 111 users / month
  • 409 users / 6 months
  • 3552 subscribers
  • 1049 Posts
  • 2939 Comments
  • Modlog