- 0 Posts
- 3 Comments
TheLazyNerd@europe.pubto
Linux@programming.dev•Linux Package Managers Compared: APT, DNF, Pacman and Zypper
3·2 months agoI have been using Nix for a year now, and I am not looking back.
All regular package managers have a problem: Sometimes a system won’t work if a specific combination of packages is installed. To prevent this, package managers block those combinations. However, how does the package manager know which combination would break the system? It is tested beforehand, and a list of illegal combinations is maintained. However, this comes with a problem: How do you test every combination of packages? If a package manager tracks just 1000 packages, there are 2^1000 possible combinations to evaluate. This means that when a package manager becomes more popular, and more packages get added, relatively fewer combinations get tested, therefore increasing the chance someone breaks his system by installing a unique combination of packages, that wasn’t evaluated and apparently breaks the system. In other words: Package managers have a flaw that causes your system to break if the package manager becomes too popular. The common solution is to create a new package manager from scratch that does exactly the same thing as the old one, but isn’t popular yet, and therefore works. However, since it works, it becomes more popular, causing it to no longer work.
Nix is different. It is designed from the bottom up that every combination of packages is possible. It is impossible that one package breaks another. This creates some other advantages as well: there is no evaluation to see whether packages break other packages, allowing maintainers to add more packages to the repository. The result: even though it is not even close to the most used package manager, it is the one with the most packages in its repository.
Yes, there are problems. The biggest is that there is no easy mode yet. But that can be implemented later. For now I see Nix (or something similar like Guix) to be the future of package managers.


Than complain to IT, not to me.
When someone tells you to install Linux and reply that you don’t know how, they’re often willing to help.
That is a perfect reason why they didn’t have to use Linux, but do have to use it now.
In that case, they’re probably not a gamer, which is the best reason not to switch to Linux. Also, when you buy a new computer, it is probably faster and less stressful to install Linux, than Windows 11 (assuming you want a usable win11, with most spyware disabled).