Package Management and System Update in Ubuntu Desktop

Ubuntu is based on Debian and all software packages are
.deb
files. Most software packages are free available from
Ubuntu Repositories. Adding and removing software and System Update are critical procedures, as for every system.

Debian packages (and Ubuntu of course) can be managed from command line using the package manager “apt”. There is
also a menu-driven, text-based frontend to apt, which is called “aptitude”.
Moreover, dpkg
command (Debian package)
is the low level package manager for Debian files (.deb). It is the backend of apt (and aptitude), which in turn is
the backend for GUI utilities like Synaptic Package Manager and Ubuntu Software Center.

Using a desktop computer (workstation), it is more possible that you will use these GUI utilities. However, you can
use
the command line if you prefer. It's a matter of choice.

You can find these applications using Ubuntu Unity Dash
(see image) or from the applications menu in other Ubuntu flavors. For example, to find “Software
Updater”, open Dash (press SUPER key) and type something relevant:

(click
the
thumb for full image)

Please note that Synaptic is not included in
default installation. To install it, use Ubuntu Software Center or open a terminal and use:

Repository Management

One of the biggest differences between Linux and Microsoft Windows is that most Linux software is free available from
Software Repositories. Every Linux distribution releases its software from Repositories and offers a “package
manager”.

Ubuntu official Repositories are: Main, Restricted, Universe, and Multiverse. Main and Restricted are fully supported
by Canonical (the company behind Ubuntu),
while Universe and Multiverse are supported by the community.

In latest Ubuntu Desktop releases all four repositories enabled by default. If you want Ubuntu to setup software
other than open source officially supported, then check "Install third-party software for graphics and Wi-Fi
hardware, Flash, MP3 and other media" during installation procedure. However, you can do it later, but it is
recommended to be done during installation. Please, note that it IS NOT RECOMMENDED in Ubuntu server systems, where
“security” is critical.

(click
the
thumb for full image)

Except these Repositories, there are many more, named PPA (Personal Package Archives) for third party programs. These
Repositories hosted in Launchpad platform. Of
course, these repositories are not supported from Canonical.

Remove Repository

To disable a repository, comment its definition in /etc/apt/sources.list or delete the relevant
.list file in /etc/apt/sources.list.d and then refresh system software sources using:

sudo apt-get update

Using “Software & Updates”

Uncheck Repository and follow the instructions

on first TAB “Ubuntu Software”

(click
the
thumb for full image)

or second TAB “Other Software”

(click
the
thumb for full image)

Using add-apt-repository

It is mainly used for PPA repositories

sudo add-apt-repository --remove ppa:whatever/ppa

Package Management (Add - remove software)

It is recommended to install software from Repositories, in order to keep your system secure and updated. In some
cases this is not possible (some Java applications or software with custom installers). In this case, you have to
take care for updates and newer versions of these applications.

Add software from Repositories

Using apt from command line

Just use the command

sudo apt-get install package_name

Using Synaptic

Search for this package

Check “Mark for Installation”

Press “Apply”

(click
the
thumb for full image)

Using Ubuntu Software

Search for this package

Check “Install”

(click
the
thumb for full image)

Add software - Direct Install .deb file

Using dpkg from command line

Just use the command

sudo dpkg -i package_name

In case of dependency problems are reported, after using dpkg, install dependencies using

sudo apt-get install -f

Using “Ubuntu Software Center”

Right click .deb file and select “Open with Software Install”

Remove software

Using apt from command line

Just use the command

sudo apt-get remove package_name

If you want to also remove user data and configuration files

sudo apt-get purge package_name

Using --auto-remove parameter will also remove package dependencies.

Using dpkg from command line

Just use the command

sudo dpkg -r package_name

To remove a package and its configuration files

sudo dpkg -P package_name

Files in your home folder are not part of the package so they will stay on your system until you remove them
by yourself.

Using Synaptic

Search for this package

Check “Mark for Removal” (“Mark for Complete Removal” will also remove configuration files)

Press “Apply”

(click
the
thumb for full image)

Using Ubuntu Software Center

Find this package in TAB “Installed”

Press “Remove”

(click
the
thumb for full image)

Remove old kernels

After installing a new Linux
kernel, old kernels are not automatically deleted. They remain in your disk (/boot
partition). You have to delete them manually.

Using apt from command line

Using GUI utilities

One of the most important things to do after installing Ununtu is to configure software update settings. Depending on
your settings (“Software & Updates” → tab “Updates” ), Ubuntu will notify you when updates are
available or will install them automatically (not recommended).

After installation, Ubuntu will prompt you, if reboot your machine is required.

(click
the
thumb for full image)

So, the available GUI utilities for software updates are:

“Software Updater”

“Software Updater” will check for available updates

(click
the
thumb for full image)

and then will install them

(click
the
thumb for full image)

“Ubuntu Software Center”

The third tab of “Ubuntu Software Center” informs you for available updates. This tool shows updates
per installed software.

Your comments are
welcomed!

This site actively encourages commenting on any post.
Comments are
not pre-moderated, but this community does not tolerate
direct or
indirect attacks, name-calling or insults. Please, read
terms of use
and Comment Policy at privacy
policy.