2

A little consideration will show that each/every Linux distribution correlates/associates with a specific Package Manager.

For example:

  • APT: Debain Family (Debian, Ubuntu, Mint, etc.)
  • RPM: RedHat Family (RedHat, Fedora, etc.)

Is each Linux distribution based on (only) a particular/specific package manager?

Or can another/any Package manager be used on different Linux distributions (for example: using Nix on Debian)?

What is the relation/interaction between a Linux distribution & it's Package Manager?

3 Answers 3

2

Short answer: package managers are highly integrated into their distribution. You may use a foreign package manager on your distribution, but this can lead to unstable, not up-to-date, redundant installation.


Long answer

A package manager keeps track of your system components and configuration:

  • Librairies
  • Softwares
  • Configuration files
  • Versions
  • Architecture

This imply that a package manager knows where everything is installed and how, and respect the distribution rules when installing new packages. Also, some package manager like Portage (on Gentoo) install packages by building them from sources. APT or RPM install pre-compiled packages.

If you use two different package managers side by side, they may override each other: install duplicate files at different places, override configuration files, replace dependencies (ex: libraries) by new versions incompatible with the rest of the system, ...

Now, in theory, you can use several packages managers on a single system. But you'll need to configure and adapt them carefully.


Other options

Tools like PackageKit provides the same interface to install and manage packages on several distribution. It doesn't replace the system's default package manager, but wrap it.

Alien can be used to convert rpm packages to deb packages.

1

You will generally find each distribution prefers one package manager system. Package managers have been ported to other distributions (e.g. APT is available for RH-type distros), but using a foreign package manager may not work well with the distro.

1

Pacman is a distro-agnostic package manager: it was originally developed for Arch Linux, but is now used by a variety of distributions, including all of the Arch derivatives and some that are not Arch-based, such as:

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .