How to Manage Linux Software

Windows and macOS tend to have just one or two ways of managing software, but Linux offers far more flexibility and freedom. Many applications are compiled directly from the source code, while others are packaged and handled by various package managers. Several distributions have their own preferred package manager, while some rely on package managers developed by other distributions.
This article explains the role of command-line package managers, examines the package manager options for various distributions and demonstrates how to manage software with some of the most common tools.
Package managers are one of the easiest differentiators between Linux distributions. Some distributions use their own package managers to handle software maintenance, though most use package managers derived from either the Red Hat or Debian approaches.
Linux installations that use a graphical user interface (GUI) usually also contain a mouse-driven tool for installing, updating and removing software. This article focuses on command-line package managers, which are often faster and more flexible.
Another unique aspect of Linux software management is compiling applications from source code. Linux software usually falls under an open-source license, meaning you have direct access to the programming code. That allows you to alter the code or customize the program before compiling and installing it, a capability not usually available for Windows or macOS software.
Note: It is poor security practice to log on to a Linux system as the root (administrator) user. Most systems force you to log on as a regular user and then use the sudo (super user do) command to elevate your privileges. You may be prompted for your password when using sudo.
Package Managers Differ Among Distributions
Various Linux distributions developed their own software package managers. You’ll need to learn to use the preferred package manager for your chosen distro.
While the specific commands vary among package managers, the general concepts are the same. Package managers typically handle the following software maintenance tasks:
- Inventory software, including version information
- Display software information
- Install software
- Update software
- Remove software
Three of the most common package managers derive from Red Hat Linux, Debian Linux, and SUSE Linux. The Red Hat approach includes several tools, while the Debian software manager relies on one primary utility.
Use RPM
The Red Hat Package Manager (RPM) has a long history with many Linux distributions, including Red Hat Linux, Red Hat Enterprise Linux, Fedora and others. It’s a command-line tool with extensive options for modifying its use.
The following two rpm subcommands install (
-i ) and remove (
-e ) software:
1 |
$ sudo rpm -ivh package.rpm |
1 |
$ sudo rpm -evh package.rpm |
The additional flags run the command in verbose mode (
-v ) and show a progress bar (
-h ).
Display version and source information for a package using the
-q (query) and
-i (information) flags.
1 |
$ sudo rpm -qi package.rpm |

Use YUM
For many years, Red Hat and other distributions relied on the Yellowdog Updater Modified (YUM) package manager. It works with the same .rpm packages and offers similar features. However, it also includes more extensible features.
Type these two yum commands to install or remove software:
1 |
$ sudo yum install package.rpm |
1 |
$ sudo yum remove package.rpm |
Get information about an installed package with this
yum command:
1 |
$ sudo yum info package.rpm |
The
yum command also recognizes the
update and
upgrade commands for when you need to bring an older software package current.
1 |
$ sudo yum update package.rpm |
Use DNF
Today’s Red Hat-derived distributions use the Dandified YUM (DNF) package manager. It provides the same basic functionality as YUM and RPM, though it offers faster dependency resolution and runs quicker. The base command is dnf.
Display the configured software repositories using the
dnf repolist subcommand:
1 |
$ sudo dnf repolist |

Here are examples of installing and removing software using the
dnf command:
1 |
$ sudo dnf install package.rpm |
1 |
$ sudo dnf remove package.rpm |
You’ll often need to update installed software. Use the
upgrade subcommand with
dnf :
1 |
$ sudo dnf upgrade package.rpm |
How do you know if a package needs an update? You can use the
info subcommand to display package information, including version. Compare that against the vendor’s latest version.
1 |
$ sudo dnf info package.rpm |

DNF has many other interesting subcommands. Try dnf history to see what DNF commands you’ve run in the past. Type dnf upgrade to upgrade all packages that have upgrades available. Search for information about a package without installing it by typing dnf search packagename .
Use APT
The Debian Linux distribution is nearly as old as Linux itself. The developers at Debian created a package manager early on, and its descendants are still in use today. The modern version of Debian’s package manager is the Advanced Packaging Tool (APT). You’ll use it with Debian, Ubuntu, Mint and many other popular Linux distributions.
APT provides similar functionality to RPM, YUM and DNF. It installs, removes, updates and reports on software packages containing the .deb file extension.
You’ll need to update the package manager repository information to access the most recent packages. The related apt command is:
1 |
$ sudo apt update |
To install or remove software with the
apt command, type:
1 |
$ sudo apt install package.deb |
1 |
$ sudo apt remove package.deb |

The upgrade subcommand brings existing packages current. You can also use the info subcommand to display information about a particular package.

Use Zypper
OpenSUSE Linux and SUSE Linux Enterprise Server use the Zypper command-line package manager. Managing software from the command line allows for scripting, consumes fewer resources and works on Linux servers without a graphical user interface (GUI), which is common. Zypper works with RPM packages, but the package manager itself is fundamentally different. The parent command is zypper.
It’s a good practice to refresh the package manager with current remote repository information before installing or updating packages. Use the
zypper refresh command to accomplish this:
1 |
$ sudo zypper refresh |
Zypper uses the same two subcommands as DNF and APT to add or remove software:
1 |
$ sudo zypper install package |
1 |
$ sudo zypper remove package |
Bring the installed packages current by using the
update subcommand:
1 |
$ sudo zypper update |
The
info subcommand displays package details:
1 |
$ sudo zypper info package |
What Are Software Package Repositories?
Distribution vendors and software developers store available packages in online repositories. Your package management software automatically searches these repositories when you attempt to install or update an application. You can edit the package manager’s configuration files to add or remove repositories.
For example, you can manage the repositories DNF will pull software from by editing the /etc/dnf/dnf.conf file.
The similar configuration file for APT repositories is /etc/apt/sources.list .

Some organizations also maintain repositories on site or on removable media for better control of software versions.
What About Compiling Software?
Linux users have another software management option that is less common for Windows or macOS folks. Linux users often compile applications from the original source code. The three-step process is relatively straightforward but may seem intimidating at first.
Most software developed for Windows and macOS systems is closed-source, meaning the licensing does not allow access to the original source code. It also does not allow that code to be modified.
Open-source software makes the original code available to anyone. Furthermore, anyone can change the source code and release their changes. This approach allows open-source software to evolve quickly and embrace new ideas.
Some application developers will compile and package the code using one of the packaging approaches discussed earlier. Others let end-users do it. Most provide both options.
Users might choose to compile software themselves for several reasons, including those listed below:
- Get cutting-edge software for testing or beta use.
- Customize the software in ways packaged software can’t be.
- Obtain software not packaged for their chosen distribution.
How to Compile Software
Many software developers provide specific instructions for compiling their software.
Here are the instructions for compiling Nmap, a popular network analysis tool:
1 2 3 4 5 6 7 8 9 10 11 |
bzip2 -cd nmap-7.95.tar.bz2 | tar xvf - cd nmap-7.95 ./configure make su root make install |
The Nmap vendor provides the above instructions.
Wrap Up
The first step with managing Linux software is recognizing which package manager application your distribution uses. There’s a good chance it is DNF or APT, but many other options exist. These options may seem confusing compared to other operating systems, but they quickly become second nature.
Once you know your system’s package manager, learn the basic commands for installing, updating and removing software. Remember to use the package manager to keep track of version numbers and other information about the software. Keeping software current increases your system’s security and ensures you have the most current software features.
Linux users have another option. They can compile applications directly from the open-source code, enabling access to new features and additional customization. Compiling software may seem intimidating, but it is actually pretty easy.
Check your selected distribution’s preferred package manager and begin updating your software for security and feature enhancements. Then use a lab environment and a few other distributions to learn more about the various types of Linux package managers.