Mastering Ubuntu Apt And Become An Apt Guru

Ubuntu Apt Guru Featured

While it is easy to install and manage many applications from the Ubuntu Software Center, it is often convenient to be able to handle installation and other operations from the command prompt. In Ubuntu, app management and installation from the command line are handled by APT (Advanced Package Tool).

Getting a handle on this will allow you to have greater control over the process of installing applications on your machines. As you get more familiar with Ubuntu APT, you will even be able to manage your installed applications more quickly through the command line than with the included GUI software center.

Note: unless you are logged in with the root account on your system, you will have to use sudo in front of the commands below.

App Installation

There are several different commands associated with installing applications with APT.

Installing a New Package

To install a new package, use the command below:

Ubuntu Apt Guru Install 4

Install Multiple Packages with One Line of Code

Instead of installing packages one by one, they can also be installed by using the command below:

Ubuntu Apt Guru Install Multiple

Package Removal

There are a few options for package removal in APT. Package removal is more nuanced than simply deleting the files from one folder, and the available commands for supporting package removal support this.

Remove a Package While Leaving Configuration Files Intact

If you want to remove a package from your computer but leave the configuration files intact, you can use the command below. This method is useful for packages you may reinstall at a later date.

Ubuntu Apt Guru Remove 4

Remove Package Along With Configuration Files

If you want to remove all of the configuration files associated with a package, then use the command below. This command is useful for packages you don’t plan on reinstalling and that you would like to see completely cleared from your system.

Ubuntu Apt Guru Purge 4

Remove One Package and Install Another in One Go

It’s actually quite common to remove one package because another one is more suitable. Whatever the reason may be, you can remove a package and install a package with one command. If you want to do this, enter the following:

In this case, you will be removing package1 and installing package2.

Ubuntu Apt Guru Remove Multiple

Remove Unneeded Packages

To remove unneeded packages, you can use the command below:

You can combine this with the removal of packages, so all unneeded packages are removed when you are uninstalling a package.

Performing Maintenance on Your Ubuntu System with APT

Just like with a physical object, you’ll need to perform maintenance on your Ubuntu system from time to time.

Update System Packages

You should update your system packages regularly to keep your system running in peak condition. The command below resynchronizes the package index files with their sources.

Ubuntu Apt Guru Update 4jpg

Upgrade Packages

The command below upgrades all packages installed on your system to the newest versions.

Ubuntu Apt Guru Upgrade

This command also upgrades system packages, but it may also remove installed packages in order to avoid conflicts.

Searching for Packages and Package Information

You may be searching for a package but may not be sure of the name. You may also just be looking for information about a package. Find out how to accomplish this below.

Locating Packages with Keywords

To find a package that contains a particular keyword, you can use the command:

Ubuntu Apt Guru Search 1 Keyword

Display Information About a Package

The command below will display information about a package, such as its version, size, dependencies, and any conflicts with it on your system.

Ubuntu Apt Guru Show Information

List Packages

If you want a list of all of the available packages, use the following command:

Ubuntu Apt Guru List All Packages

The following command provides a list of all of the available packages, including information about the versions and architecture of the package:

If you would like to see all the packages you have installed on your system, then use:

To see a list of packages that can be upgraded, use the following command:

Now that you know how to use Ubuntu Apt, there are times where a package is broken and you need to fix it. Learn how to fix broken packages in Ubuntu. Or, if you prefer the Software Center and it is not working, check out our guide for help in fixing the Software Center not working issue in Ubuntu.

William Elcock William Elcock

William has been fiddling with tech for as long as he remembers. This naturally transitioned into helping friends with their tech problems and then into tech blogging.


  1. If you are new to Linux\Ubuntu don’t let this post scare you, it can all be done through the GUI. No need to be an expert. Ubuntu comes with a GUI program called “Software Boutique” to install\uninstall software. Updates are handled with the GUI program “Software Updater”. No terminal, no command line needed. I do agree with Dragonmouth, and use Synaptic. You can install Synaptic through the Software Boutique. I find Synaptic the best GUI program for installing/uninstalling programs, though it does take more getting use to than the Software Boutique. For some reason, “experts” think every user desires to become an expert like them, some like me, just want a system that works!

  2. This is the DEBIAN way. It has been since the beginning of DEBIAN. I have nothing nice to say about ubuntu. I am a +20 year user of DEBIAN.

Comments are closed.