Package Management on Linux Distributions
Published: 2022-01-12 | Last Updated: 2022-01-12 | ~5 Minute Read
Table of Contents
- What is Package Management?
- Why is Package Management Important?
- Major Package Management Systems
- Slackware Package Management
- Dependency Resolution
- Conclusion
What is Package Management?
If you are familiar with GNU / Linux distributions you have surely come across these words at one point or another. For some users, usually more technically inclined, this is a factor that can “make or break” their decision of whether they will use a given Linux distribution or not.
Package management is simply a way to manage the many different software tools that are present on a Linux system.
We’ll be taking a look at an overview of package management today.
Why is Package Management Important?
This is not always obvious to the new Linux user, precisely because package management does its job so well, but package management plays a central role in keeping a Linux system operational over time.
The main job of a package management tool is to ensure that software installation, update and removal occurs in a user friendly manner. A proper package manager will aid the user throughout their use of a Linux distribution when trying to customize their system to fit their needs.
Major Package Management Systems
There are two main package management systems in use by Linux distributions today, those are the rpm
(Red Had Package Manager) and the dpkg
package management system crated by the Debian project.
RPM
The rpm
package system was created by Red Hat and uses the .rpm
suffix. Some of the distributions that support this package management system are Red Hat, Fedora, OpenSUSE and distributions based off these.
Some of the (basic) common commands used by this system are the following:
Installing an rpm package:
# rpm -i package.rpm
Upgrading an rpm package:
# rpm -U package.rpm
Removing an rpm package:
# rpm -e package.rpm
DPKG
The dpkg
package system was created by Debian and used the .deb
suffix. Some of the distributions that support this package management system are Debian, Ubuntu, Mint and distributions based off these.
Some of the (basic) common commands used by this system are the following:
Installing a deb package:
# dpkg -i package.deb
Upgrading a deb package:
# dpkg -i package.deb
Removing a deb package:
# dpkg -r package.deb
Slackware Package Management
Slackware manages packages a bit differently from these two major package managers, Slackware uses the .tgz
or .txz
suffix. Slackware Linux is the main distribution that uses this type of package management but other distributions have also adopted this style of package management, FatDog64 for example.
Some of the (basic) common commands used by this system are the following:
Installing a Slackware package:
# installpkg package.tgz
Upgrading a Slackware package:
# upgradepkg package.tgz
Removing a Slackware package:
# removepkg package.tgz
Dependency Resolution
One of the commonly included features in package managers is dependency resolution. This feature enables the package manager to know which packages are required in order to successfully install and execute other packages. This is often accompanied with a way for the package manager to keep track of all the software that is installed on your system along with details about it like its version.
This allows for distributions to be easily updated and maintained by users of all technical backgrounds. Whether they’re technically advanced users or not they can easily execute one of the commands above in their Ubuntu system for example and the distribution will take care of all the technical requirements for them in order to ensure that the package they’re installing is able to run after installation is complete.
Both of the major package managers listed above provide automated dependency resolution. Slackware on the other hand does not, and instead allows the administrator to be in control of dependency resolution for their system. This is the intended behavior as stated in the Slackware philosophy and is seen as a positive by some and as a negative by others.
Conclusion
This brief look into package management shows that within the GNU/Linux ecosystem there are many different options that cater to different requirements and preferences alike. Which one you choose is up to you since you have the freedom to choose based on your own criteria.