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
link
fedilink
152Y

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

@cronjob
link
fedilink
72Y

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

@Czernobog
creator
link
fedilink
52Y

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
link
fedilink
12Y

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

@marmulak
link
fedilink
112Y

flatpak all the way

@Czernobog
creator
link
fedilink
62Y

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

@Doug
link
fedilink
42Y

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

@marmulak
link
fedilink
122Y

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
link
fedilink
32Y

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
link
fedilink
02Y

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

@TheMainOne
link
fedilink
7
edit-2
1Y

deleted by creator

@marmulak
link
fedilink
4
edit-2
2Y

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
link
fedilink
8
edit-2
2Y

deleted by creator

@adrianmalacoda
link
fedilink
8
edit-2
2Y

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
link
fedilink
02Y

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
link
fedilink
7
edit-2
2Y

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
link
fedilink
22Y

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

@otso
link
fedilink
52Y

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
link
fedilink
32Y

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
link
fedilink
22Y

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

Portage gang Portage gang Portage gang.

Apt is nice too.

@Czernobog
creator
link
fedilink
2
edit-2
2Y

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
link
fedilink
4
edit-2
2Y

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
link
fedilink
22Y

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
link
fedilink
22Y

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
link
fedilink
12Y

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
link
fedilink
22Y

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.

@trokhymchuk
link
fedilink
32Y

Portage for features, pacman + AUR helpers for speed

@PureTryOut
link
fedilink
22Y

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
link
fedilink
12Y

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

@PureTryOut
link
fedilink
22Y

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

@Czernobog
creator
link
fedilink
22Y

what does “dogfooding” mean?

@PureTryOut
link
fedilink
22Y

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
link
fedilink
1
edit-2
2M

deleted by creator

@PureTryOut
link
fedilink
32Y

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
link
fedilink
22Y

What do you mean by embedded?

@ajz
link
fedilink
3
edit-2
2M

deleted by creator

@gregf
link
fedilink
22Y

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

@marmulak
link
fedilink
22Y

One of my favorites too

Ephera
link
fedilink
22Y

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
link
fedilink
2
edit-2
2Y

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
link
fedilink
12Y

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
link
fedilink
12Y

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
link
fedilink
12Y

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
link
fedilink
12Y

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

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
  • 7 users / day
  • 49 users / week
  • 111 users / month
  • 528 users / 6 months
  • 5.34K subscribers
  • 2.13K Posts
  • 6.93K Comments
  • Modlog