01. Package management

In this short series, we'll go over package management - an essential tool for both beginner Linux users and the more seasoned system adminstrators. Package management will help you seamlessly install, upgrade and maintain software. This series will cover Debian (Ubuntu) package management for now, but we will also include lessons for Red Hat in a future lesson.

A time before package management

Long ago when software wasn't as abundant as it is today, package management was nonexistent. This meant that users had to individually download and compile source code when installing software, a process that was redundant as it was time consuming. Additionally, software that required other dependencies had to be installed separately, making the process of installing large software systems incredibly tedious. With the number of software in a person's computer increasing, so did their complexity of management, as upgrading systems had to be performed manually.

Why can't I manage all these software packages?
A user attempting to manage software packages without a package management system.

How do package managers help?

Nowadays, almost all platforms come with a designated package management system. Package managements allow you to install, upgrade, configure and remove software packages from your computer's system. At the heart of this system is a database that contains information about your softwares' last-upgrade dates, dependencies, version number, and more. Package managers allow you to conveniently manage all the software without a sweat.

How package management changed the development community

Not only has package management allowed for users to easily download and maintain software, but it has also forced developers to uphold a strict convention as to how their software is structured.

Furthermore, we now have software available in packages, with information about dependencies, and version numbers. This allows us to keep track of bug information and whether it is necessary to download security patches.

What Package Managerment software is available?

Depending on your Linux distribution, (Debian, Red Hat or SUSE), or platform (OS X), we have different package management software and tools.

SUSE, redhat and Debian.
Package management software depends on which Linux distro you use: SUSE, redhat and Debian.

For the Debian distribution, which includes Linux Mint, Ubuntu, Debian, and Linspire, packages come in .deb files, and use tools like apt and dpkg.

Red Hat, which includes CentOS, Fedora, Mandrivia and OpenSuSE, use packaging tools rpm and yum.

For OS X, you can use Homebrew.

Review of some terminology before we begin

Package file

From the perspective of a package management system, a package file contains all the data files and programs that support the software. This is where all the metadata is found, including a description of its contents, version number and more. This also includes scripts that run before and after the installion is performed.


Dependencies are additional packages required by the principal package in order to function propertly. In short, it is a piece of software that is required for another to run. For example, if the year were 2004 and I wanted to watch a funny animation on the web, I would have to first install Adobe Flash Player. Thus, Adobe Flash Player serves as a dependency to flash animation videos.

Package managers maintain dependency information, allowing the system to know whether it needs to pull anything other programs in.


Libraries are software components that can be shared by many different programs. This allows a reduction in disk space and memory requirements, as multiple programs are allowed to access the same files.


The package management system uses checksums to validate and verify installed software. Checksums allows the computer to check for disk errors or accidental overwrites of files.

Sign in a root

To use any commands that have to deal with package management, you'll need to be signed in as root. To do so, use the sudo -s command, and put in your system's password when prompted.

Want to avoid becoming a code monkey?

Pragmatic Thinking

Want to avoid becoming a code monkey? Try Good Practice

Programmers have to constantly learn new concepts and technologies. In this book by Andy Hunt, you'll learn how our brains are wired, and how to take advantage of your brain's architecture to make the most of your learning. You'll learn new tricks and tips to learn more, faster, and retain more of what you learn.

$ Check price
34.9534.95Amazon 4.5 logo(86+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

System Admin Handbook

Take your Linux skills to the next level! Try Linux & UNIX

This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, and much more.

$ Check price
74.9974.99Amazon 4.5 logo(142+ reviews)

More Linux & UNIX resources