# Adding, Removing and Updating Applications

&legalnotice;

This section discusses how applications are installed, removed and kept up-to-date. Also covered are how packages are stored by Ubuntu and made available for download.

## How is software installation on Ubuntu different from on Windows?

Ubuntu handles software installation in a very different way to Windows.

If you want to install an application on Windows, you must normally buy a CD containing the software, or download an installer package from the Internet. You then run the installer program, which guides you through the installation process.

On Ubuntu, you simply open a package manager, search for the application that you want and click a button to install it. Removing an application is just as simple.

The package manager downloads applications from a software repository, which is a location on the Internet which stores a collection of applications. These applications come bundled in packages, which contain all of the information needed for installation. You can download packages yourself, using your web browser, if you like, but it is generally much more convenient to let the package manager handle this for you.

Some packages depend on other packages being installed in order to work. For example, a word processing package may require a printing package to be installed. The package manager automatically installs these dependencies for you.

By default, only applications from the official Ubuntu software repositories are available in your package manager. If you cannot find the application that you want in the default repositories, you can add other (third-party) repositories and install it from there.

## Installing an application

- Click &software-center; and search for an application, or select a category and find an application from the list.

- Select the application that you are interested in and click Install.

- You will be asked to enter your password. Once you have done that the installation will begin, as long as you have a working Internet connection.

- The installation usually finishes quickly, but could take a while if you have a slow Internet connection. When it has finished, your new application will be ready to use; most applications can be accessed from the Applications menu.

For more information about using the Ubuntu Software Center, consult the Ubuntu Software Center Manual.

### Other methods of installing applications

#### Using Synaptic Package Manager

Synaptic can be used to manage advanced software packages (such as server applications) which Software Center does not manage.

- Click &synaptic;. Enter your password if prompted.

- Click Search to search for an application, or click Sections and look through the categories to find one.

- Right-click the application that you want to install and select Mark for Installation.

- If you are asked if you would like to mark additional changes, click Mark.

- Select any other applications that you would like to install.

- Click Apply, and then click Apply in the window that appears. The applications that you chose will be downloaded and installed.

#### Downloading and installing a .deb package

You can download and install applications from websites. These applications are contained in Debian (.deb) packages. To install a Debian package:

- Download the package from a website.

- Double-click the package. It will be opened in the Package Installer.

- Click Install to install the package.

Installing single packages in this way is not recommended, for the following reasons:

- The packages have not been checked for security by Ubuntu members, and could contain software which harms your computer. You should only download single packages from websites that you trust.

- The package may require some extra software to run, which cannot be installed automatically. You will have to find and install this software yourself.

#### Clicking a link on a web page

Some web pages have links which install applications when you click them. These are known as apt: links. After clicking the link, you will be asked if you would like to install additional software. Click Install to start the installation process.

The application can only be downloaded and installed if it is available in a software repository which is currently enabled on your computer. This means that websites cannot trick you into installing software which is potentially harmful to your computer.

## Removing an application

- Click &software-center;.

- In the Installed Software section, find the application that you want to remove by finding it in the list or by searching for it.

- Select the application and click Remove.

- You may be asked to enter your password. After you have done that, the application will be removed. This should not take very long.

Some applications depend on others being installed in order to work properly. If you try to remove an application which is needed by another application, both of them will be removed. You will be asked to confirm that this is what you want to happen before the applications are removed.

For more information about using the Ubuntu Software Center, consult the Ubuntu Software Center Manual.

If the application that you want to remove is not available in the Ubuntu Software Center, use Synaptic (&synaptic;) to remove it instead.

## Adding a software repository

Software is available from third-party sources, as well as from the default Ubuntu software repositories. If you want to install software from a third-party software repository, you must add it to the package manager's list of available repositories.

Only add software repositories from sources that you trust. Third-party software repositories are not checked for security by Ubuntu members, and may contain software which is harmful to your computer.

- Open &software-sources; and select Other Software.

- Click Add to add a new repository.

- Enter the APT line for the extra repository. This should be available from the website of the repository, and should look similar to the following:

      deb http://archive.ubuntu.com/ubuntu/ &distro-short-codename; main

- Click Add Source and then click Close to save your changes.

- You will be notified that the information about available software is out-of-date. Click Reload.

- Packages from the new repository should now be available in your package manager.

As a security measure, most software repositories use a GPG key to digitally sign the files they provide. This makes it easy to check that the files have not been tampered with since their creation. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the repository's website.

Download the GPG key. Then, click &software-sources;, select the Authentication tab, click Import Key File and select the GPG key to be imported.

You can also add the GPG key using the terminal by entering the following command:

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com key-fingerprint

### Adding a Personal Package Archive (PPA)

Launchpad provides all users with their own Personal Package Archive (PPA) that can be used to build and store Ubuntu packages. In the same way that you can add a normal software repository, you can also add a PPA to the package manager's list of available repositories. PPAs work like normal Ubuntu archives. You can install software in the usual way -- for example, through apt-get or synaptic -- and whenever there's an update Ubuntu will prompt you to install it.

You download and install PPA packages at your own risk. Ubuntu, Launchpad and Canonical do not endorse these packages. You must be certain that you trust the PPA owner before you install their software.

You should begin by familiarizing yourself with before beginning.

The APT line for the PPA can be found on the PPA overview page on Launchpad, and should look similar to the following:

    deb http://ppa.launchpad.net/user/ppa/ppa-name &distro-short-codename; main

As a security measure, all PPAs use a unique GPG key to digitally sign the packages that they provide. This makes it easy to check that the packages have not been tampered with since Launchpad built them and to be sure that you are downloading from the PPA that you want. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the PPA overview page on Launchpad. Until you add the PPA's key to your system, you will see warnings that you are downloading from an untrusted source.

The key used to sign a PPA is listed on the PPA overview page. Instructions on how to add the key can be found in .

Additional information about adding a PPA repository can be found on Launchpad.

## Installing software packages without an Internet connection

If you are not connected to the Internet, you can use a CD containing package files to install applications on your computer. The Ubuntu installation CD can be used for this purpose, and other CDs with different packages are available as well. Additionally, the program APTonCD can automatically backup installed packages on your system, and create CDs with the contents of various repositories on them.

### Installing packages using the Ubuntu installation CD

Some packages from the main and restricted Ubuntu package repositories can be installed from the Ubuntu installation CD. Simply insert your Ubuntu installation CD and open &synaptic;. To list only packages on the Ubuntu installation CD, click on the Origin button in the lower left corner of the Synaptic window. The packages should be listed under the &distro-apt-cd-name; section.

If the packages are not listed, it may be because the CD is not listed as a package repository (the CD should be listed as a repository by default). To add the CD as a package repository, follow the instructions in , below.

### Enabling other CDs that can be used to install packages

To enable Synaptic and other package managers to install software from CDs which contain packages:

- Click &software-sources;.

- Select Other Software and click on the Add CD-ROM button.

- Insert the CD.

The packages should then be listed. To have Synaptic only list packages from the CD, click the Origin button on the lower left corner of the Synaptic window and then find the name of the CD in the list in the upper left corner the window.

### Using APTonCD to install packages

APTonCD can be used to create a CD that contains all the packages you have on your system, or it can create CDs with packages or entire repositories of your choice. In a package manager such as Synaptic, find the aptoncd package and install it.

Further documentation on APTonCD can be found on its website, aptoncd.sourceforge.net

## What is restricted and non-free software?

Most of the software available for Ubuntu is free, open-source software. This software is free for anyone to install and use, and people can modify the software and redistribute it if they like. Ubuntu is built from this type of software.

Non-free software is software which is not freely redistributable or modifiable. This makes it difficult for the Ubuntu developers to improve the software and correct problems, so it is normally recommended that you use free software instead.

Restricted software is software which has restrictions on its use, preventing it from being classed as free software. Non-free software is a type of restricted software, where the restrictions are due to the software having a non-free license. Other reasons for software being classed as restricted include legal issues (use of some types of software is illegal in some countries) and patent issues (some software requires a patent license to be used legally).

In some cases, restricted software is the only option. Such cases include software for the playback of certain audio and video formats, some fonts and drivers for some graphics cards.

You should be warned by the package manager when you try to install restricted software. If the restricted software cannot be used legally in your country then there is little you can do; you should not install the software. If the software is restricted simply because it is non-free, you may choose to use it (for example, in the case of graphics card drivers). Be aware that most restricted software is not supported in Ubuntu, and problems with such software often cannot be corrected by Ubuntu developers.

Sometimes it is difficult to determine why a particular software package is restricted. If this is the case, seek advice on the Ubuntu Forums. If you are still unable to determine why a package is restricted, err on the side of caution and do not install it; it may be illegal to use it in your country.

## Overview of the default Ubuntu software repositories

When you install software on Ubuntu, the package manager automatically downloads the required software packages from a software repository, a location on the Internet which stores collections of packages ready to be downloaded.

There are thousands of programs available to install on Ubuntu. These programs are stored in software repositories and are made freely available for all Ubuntu users. This makes it very easy to install new programs, and it is also very secure because each program you install is built specially for Ubuntu and checked before it is allowed into the repositories.

### Software repositories

To organize the software, Ubuntu repositories are categorized into four groups: Main, Restricted, Universe, and Multiverse. The rationale used to determine which software goes into which category is based on the level of support that software development teams provide for a program and the level of compliance the program has to the Free Software Philosophy.

The standard Ubuntu Install CD contains some software from the Main and Restricted categories.

If your system is connected to the Internet, many more software programs are made available for installation. For example, the Universe and Multiverse repositories are only available over the Internet.

The Multiverse repository contains software which has been classified as non-free. This software may not be permitted in some jurisdictions. When installing each package from this repository, you should verify that the laws of your country permit you to use it. Also, this software may not include security updates.

### Update repositories

The Update Manager automatically finds software updates for your computer when they are available. It regularly gathers information on potential updates from a number of online update sources.

If you click &software-properties; and select the Updates tab, you will notice that four update sources are available. An explanation for each of these is provided below:

- Important security updates: Updates which fix critical security flaws are made available through this source. It is recommended that all users leave this source enabled (it should be enabled by default).

- Recommended updates: Updates which fix serious software problems (which are not security flaws) are made available through this source. Most users will want to leave this source enabled as common and annoying problems are often fixed with these updates.

- Pre-released updates: Updates which are currently being tested before being released to everyone are provided through this update source. If you would like to help test new updates (and get fixes for problems more quickly), enable this source. Be aware that these updates may not yet be well tested; it is not recommended that you enable this source unless you are prepared to experience occasional problems.

- Unsupported updates: When new versions of popular software are released they are sometimes back-ported to an older version of Ubuntu so that users can benefit from new features and fixes for problems. These backports are unsupported, may cause problems when installed and should only be used by people who are in desperate need of a new version of a software package which they know has been backported.