Software management in Ubuntu 16.10

Ubuntu 16.10 comes with some changes to the way you install and manage extra software on your computer. Ubuntu's tailor-made Software Center is gone, replaced by the lighter (and prettier) Gnome Software app (dubbed simply Ubuntu Software ). You'll find some changes on the command line, too.

The new Software app provides centralized software management and allows you to search for new software and install it with a mouse click. With an Ubuntu One account, you can purchase software with a credit card.

The Debian packages (ending in .deb ) that the Software app offers are actually archive files containing libraries, configuration files, and executable programs. If you install the Firefox package, for example, the package manager distributes the necessary files to the correct places in the filesystem for you.

Packages often have dependencies, which means installing program A requires that you have program B also installed. The package manager identifies the dependent packages automatically during installation and loads them onto your computer. Usually, you will notice the dependencies when you try to install a single Debian package over the Internet.

The package you are looking for, such as a video codec, may be missing in the Software app. In this case, you can find the package in external repositories created by the software's users or developers. The repositories contain not only the software but also the packages on which they depend. (How to tap into these repositories is covered in the "What Are Repositories?" section.)

Package Manager in Action

Getting to repositories and installing software is often faster from the command line. The "Quick Sources" section goes into greater detail. First, let's look at managing packages using Ubuntu's Software app. To access the Software app, press the Super key [1] and enter softw . The start page features the Editor's pick and Recommended games applications, as well as a Featured Application at the top (Figure 1).

Figure 1: The Software app encourages you to browse.

If you scroll down, you'll see several category buttons. Click on any of the buttons, and you'll see a list of subcategories listed down the left-hand side of the window. Click on Internet , for example, and the list will show Featured , All , Action , Adventure , Arcade , etc. Click on any subcategory, and you can browse for individual apps (Figure 2). Use the arrow icon in the upper left to return to the start window.

Figure 2: Clicking a subcategory on the left shows individual apps you can install.

You'll find three other controls at the top of the package management window. The All tab lists all the software in all the available repositories. This is the default view.

The Installed tab displays only the installed applications, sorted by category. You can use this view to remove software you don't want or need anymore. Downgrading, unfortunately, doesn't work in the Software app. To do that you must install the Synaptic Package Manager and specify an earlier Version in the Properties .

Updates shows new versions of installed programs that you will want to install to get rid of bugs and open vulnerabilities (Figure 3). Most updates will install automatically by default, so this tab will usually be empty. You can disable this behavior in the settings.

Figure 3: Check for new versions of your software in the Updates tab.

If you already know the name of the software, choose the All tab and use the search field at the top center of the view. Results show up as you type, and next to the software names are the ratings in the form of stars. You can install directly from the list or click on the programs icon and read more about the app.

The app's information screen will include a screenshot, a description, and comments from users, as well as information about the version, the license it is distributed under, and how much hard disk it will take up once installed (Figure 4). Finally, click the Install button to install the program. Once the program is installed, you can click the Write a review link to evaluate the software. This requires an Ubuntu One Single Sign-on account [2].

Figure 4: Once you choose an installable package, you'll get further information on it: ratings, screenshots, descriptive text, and more.

The search won't find all programs. The Software app does not list libraries or developer files. To install these packages, you will have to use the apt command-line utility.

To add other repositories, click on the Ubuntu Software drop-down menu at the top of the screen and choose Software and Updates (Figure 5). More on this later.

Figure 5: Choose or add new repositories to access more software.

What Are Repositories?

The Software app gives you access to thousands of packages, but the one you want might be missing or only in an older version. This is where external repositories and the PPAs help.

The Opera repository [3] is one such external repository, and it provides the Opera web browser that is missing from Ubuntu's standard repositories. The VirtualBox project [4] also provides the proprietary version of its own software, which supports the virtual USB 2.0 ports and Remote Desktop Protocol (RDP), from its own repository.

Personal Package Archives (PPAs) are special versions of external repositories that you can only find on Ubuntu's Launchpad. When experienced Ubuntu users or developers create Debian packages out of their favorite software, they frequently offer them in their personal package archive on Launchpad. Using a search function [5], you can peruse the platform for new versions of current software with great success.

Complementing Package Sources

As explained above, in the Software app, you can download from external repositories using Ubuntu Software | Software and Updates . To use the Opera project's external sources, for example, click Other Software and Add , then enter deb http://deb.opera.com/opera/stable non-free . This address wasn't invented: Usually, the address is the website for the external repository. Click the Add Source button to accept the repository (Figure 6).

Figure 6: Obtain additional packages from external repositories.

External repositories often protect themselves from abuse with keys. Every package has a signature verified with a key, so that manipulated packages with mismatched signatures fall by the wayside. Often, you can't access a package offering without a key, but how do you find the key?

To import the key for the Opera repository, invoke a terminal through Ctrl+Alt+T and use the following command:

$ sudo apt update

The command updates the list of available software for the Software app and returns an error message. Then, enter:

$ sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add -

For other repositories more tied in with Ubuntu, you may have to query the Ubuntu keyserver:

$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 B9A06DE3

In this case, the preceding command downloads the appropriate key (B9A06DE3) for the developer's Launchpad PPA for the Inkscape vector design software and integrates it with package management. If you can't get to the keyserver, it may be temporarily overloaded. Replace keyserver.ubuntu.com in the command with another keyserver, such as subkeys.pgp.net , pgp.mit.edu , or keys.gnupg.net . After the sudo apt update command, you should be able to install the software from the source. The new repository might not show up in the Software app right away.

Key Over Terminal

As seen above, most websites show a simple line that you can copy with Ctrl+C and Ctrl+V to the terminal. The line might appear as in the following VirtualBox example:

$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc- O - | sudo apt-key add -

The command downloads the key from the website (using wget -q {HTTP-LINK} ), sends it to the console (with -O - ), and passes it to the sudo apt-key add command. Then, use sudo apt-get update to update the package list and load up the VirtualBox package.

Integrating PPAs

With about 6,000 active PPAs on Launchpad, it is easy to get brand-new software versions with the latest functionality. Among them are exotic programs and (unstable) developer versions of system components such as the kernel or NetworkManager. Before compiling software from the sources, first use a PPA search [4] to see whether a PPA might exist.

The fastest way to integrate PPAs into the package manager is through the command interface because it saves you the key search. Press Ctrl+Alt+T to open the terminal and enter what usually amounts to three command lines, something like the following:

$ sudo add-apt-repository ppa:inkscape.dev/stable
$ sudo apt update
$ sudo apt install inkscape

These commands mount the PPA for the Inkscape vector drawing solution. For other software, simply replace the parts after ppa: and sudo apt-get install . Take the text for the part after ppa: from the website (Figure 7). It may take a while for the repository to appear in the Software app.

Figure 7: In this PPA, you'll find the current packages for Xenial Xerus to install the Inkscape design application.

Removing Software

To remove software, open the Software app, search for the name of the software, and click Remove . The configuration data is unaffected. The advantage is that you don't need to reconfigure the software if you decide you need it again later. If these remnants (such as you might find in the /etc or /var directories) were to disappear, use the command line to remove the package.

Quick Sources

The Software app is a graphical interface for APT, the Advanced Packaging Tool, which manages the list of software in the repositories in the background. As already noted, you can also run apt over the command line; many experienced Ubuntu users prefer this method because the commands work with any Ubuntu derivative. Following are four important commands:

$ sudo apt update
$ sudo apt search (--names-only) inkscape
$ sudo apt install inkscape
$ sudo apt remove (--purge) inkscape

The first command brings the package list up to date. It is important to keep all the software on your system current considering how quickly program versions change. The next line searches for a package with a name or description that includes the term inkscape . Add the --names-only option (without the parentheses) to the command to search for the package name only. The third line installs the package, and the fourth line removes it. Use the --purge option to purge the configuration files in the home directory along with the package.

To remove all the packages installed through a PPA, either use the Software app and choose the PPA next to Installed . Another way to remove a package is to stay on the command line, install the ppa-purge package, and enter the following command:

$ sudo ppa-purge ppa:inkscape/stable

for the Inkscape example.

Single Consignments

Finally, there are some websites that provide single Debian packages to download. To install the software, double-click the DEB package. Ubuntu then calls the Software app and recommends installing the package. Once you click OK , the package appears together with a screenshot and description in the Software app. Finally, download the package with Install .