Skip to content

Install Package Based on Distros

Depending on the Linux distribution you are using, it will have a different Linux package manager. Here's a quick list of each package manager for popular distributions.

https://en.wikipedia.org/wiki/List_of_Linux_distributions

Debian Based

Example

Debian, Ubuntu, Linux Mint

Package Format: .deb
APT (Advanced Package Tool): The primary package management system.
sudo apt update: Updates the package index.
sudo apt upgrade: Upgrades all installed packages to their latest versions.
sudo apt install <package_name>: Installs a package.
sudo apt remove <package_name>: Removes a package.
sudo apt autoremove: Removes unnecessary packages.

Backend: dpkg (Debian Package) is the low-level tool that APT uses to handle .deb files.

dpkg -i <package.deb>: Installs a package file.
dpkg -r <package_name>: Removes a package.
dpkg -l: Lists all installed packages

Red Hat-based Distributions

Example

Red Hat Enterprise Linux (RHEL), CentOS, Fedora , Linux Oracle, Rocky Linux

Package Format: .rpm

YUM (Yellowdog Updater, Modified): Older package manager used in RHEL and CentOS

sudo yum update: Updates all packages.
sudo yum install <package_name>: Installs a package.
sudo yum remove <package_name>: Removes a package.

DNF (Dandified YUM): Successor to YUM, used in Fedora and newer versions of RHEL/CentOS

sudo dnf update: Updates all packages.
sudo dnf install <package_name>: Installs a package.
sudo dnf remove <package_name>: Removes a package.

RPM (Red Hat Package Manager): The low-level tool for managing .rpm files.

sudo rpm -i <package.rpm>: Installs a package file.
sudo rpm -e <package_name>: Removes a package.
rpm -qa: Lists all installed packages.

Arch-based Distributions

Example

Arch Linux, Manjaro

Package Format: .pkg.tar.zst

pacman: The primary package management tool.

sudo pacman -Syu: Synchronizes the package database and updates the system.
sudo pacman -S <package_name>: Installs a package.
sudo pacman -R <package_name>: Removes a package.
sudo pacman -Rns <package_name>: Removes a package and its dependencies.
pacman -Q: Lists all installed packages.

AUR (Arch User Repository): A community-driven repository with additional packages. AUR helpers like yay or pikaur are often used to install packages from AUR.

SUSE-based Distributions

Examples: openSUSE, SUSE Linux Enterprise Package Format: .rpm Package Managers: Zypper: The primary package management tool.

Commands:

sudo zypper refresh: Refreshes the repository metadata.
sudo zypper update: Updates all installed packages.
sudo zypper install <package_name>: Installs a package.
sudo zypper remove <package_name>: Removes a package.

YaST (Yet another Setup Tool): A configuration tool that includes a graphical package manager among other system management utilities.

Gentoo-based Distributions

Examples: Gentoo, Funtoo

Package Format: Source-based, built from source code.

Package Managers: Portage: The primary package management system, focused on source-based installation. Commands:

sudo emerge --sync: Syncs the package repository.
sudo emerge <package_name>: Installs a package.
sudo emerge --unmerge <package_name>: Removes a package.
emerge -av <package_name>: Installs a package with a prompt to confirm actions.

USE Flags: Special flags that determine how software is built from the source.

Solus-based Distributions

Examples: Solus

Package Format: .eopkg Package Managers: eopkg: The package management tool.

Commands:

sudo eopkg update-repo: Updates the package repository.
sudo eopkg upgrade: Upgrades all installed packages.
sudo eopkg install <package_name>: Installs a package.
sudo eopkg remove <package_name>: Removes a package.
sudo eopkg list-installed: Lists all installed packages.

Flatpak, Snap, and AppImage

Flatpak: A universal package format that works across different distributions.

Commands:

flatpak install <package_name>: Installs a package.
flatpak update: Updates all installed flatpaks.
flatpak uninstall <package_name>: Removes a flatpak.

Snap: Another universal package format managed by Canonical (used in Ubuntu).

Commands:

sudo snap install <package_name>: Installs a snap package.
sudo snap refresh: Updates all installed snaps.
sudo snap remove <package_name>: Removes a snap package.

AppImage: A format for distributing portable applications. Usage: Download an AppImage, make it executable (chmod +x <filename>.AppImage), and run it directly. These tools and package management strategies ensure that each Linux distribution can manage software efficiently while catering to the specific needs and philosophies of the distribution.

Comments