Linux Package Managers

This post explains some different package managers available for Linux operating system.

List of Linux Package Managers

Linux package managers featured on this post:

  • Dependent packages
    • APT
    • YUM
    • DNF
  • Standalone packages
    • Snap
    • Flatpak
    • AppImage

APT

APT, an acronym for Advanced Package Tool, is a package manager. Its command is apt, formerly known as apt-get.

It was introduced in 1998 as a development within the Debian project. apt works with Debian packages, that have file extension .deb.

A deb package contains only the data for its own application. In case that the application requires other packages (i.e., there are dependencies), the other packages will be automatically downloaded and installed before the app. This operation would be recursive for each package involved.

Because of the use of dependencies, apt-get packages are smaller than snap packages.

apt does not allow to install different versions of the same package.

When you run an app installed from apt, it is run as a standard process in the OS. There is no sandboxing.

To update the info from repositories:

sudo apt update

To install a package with apt:

sudo apt install packagename

To uninstall a package with apt:

sudo apt remove packagename

To update installed packages with apt:

sudo apt upgrade

To upgrade only a single package, and only if it is installed.

sudo apt --only-upgrade install packagename

To check which version of a package is installed, you can use command apt-show-versions. apt-show-versions is not installed by default.

To install apt-show-versions:

sudo apt install apt-show-versions

To check the version of an installed package (using apt-show-versions):

apt-show-versions packagename

To check which packages can be upgraded:

apt list --upgradable

To remove packages that are no longer needed because they are no longer used by apps:

sudo apt autoremove

To upgrade the operating system:

sudo do-release-upgrade

YUM

Yellow-dog Updater Modified (YUM) is a package manager that work with .rpm packages.

YUM is the tool that works with RPM (RPM Package Manager, formerly RedHat Package Manager) packages, that have file extension .rpm.

DNF

DNF (Dandified YUM) is an evolution of Yum packages.

Standalone Packages

Snap

Snap is a package manager developed by Canonical, the British company behind Ubuntu OS.

Snap packages include the dependencies within it, and thus, they are standalone packages. This is one of the reasons why snap packages are heavier than apt packages.

snap packages are standalone. This packages includes all dependencies. Because of this reason, snap packages are heavier.

Because there are no dependencies between packages, snap packages are easier to create than apt.

The installation and uninstallations are usually cleaner.

Snap allows to install multiple versions of the same package.

Another feature from snap packages is that when you execute an application installed from snap, it is run in a sandboxed environment.

To install a package with snap:

snap install packagename

To uninstall a package with snap:

snap remove packagename

Snapcraft is the tool for developers to create a snap package.

If you want to get more information about how to create a snap package, check out this external link.

Flatpak

Flatpak is developed by Red Hat.

AppImage

AppImage was developed by Simon Peter.

Linux Packages

Linux packages:

  • deb
  • rpm

You might also be interested in…

External References

Leave a Reply

Your email address will not be published. Required fields are marked *