How Ubuntu’s package management system stays on top of many software updates
One of Ubuntu’s strengths is its package management system.
This is something that may sound fairly unimportant overall, but can make a huge difference. It controls how you install, remove and upgrade parts or all of the operating system.
In this article we look at this in some detail, together with how to add extra sources of software to your Ubuntu installation.
Ubuntu inherits its package management system from Debian. This is seen by some as one of the reasons Ubuntu initially found such success.
The ‘Advanced Packaging Tool’ (APT) used by Debian made the installation of packages much simpler compared to other distributions at the time.
Before looking at the ways to use APT, it may be useful to look at what we mean by these various terms.
A package is a collection of related files, usually an application or a library.
Rather than download ‘exe’ installation files, as with Windows, a package is downloaded instead.
This contains all the necessary files, as well as scripts to configure and install the software correctly.
The package also contains details about its contents or purpose, a list of other packages it depends on to function, and so on.
The package format used by Debian and Ubuntu is ‘.deb’ and, although these can be managed directly with the ‘dpkg’ tool, the APT system works on top of them to manage all the packages on the system. So you could consider the operating system as modular: everything installed is part of one particular package, each of which can be managed in the same way.
Repositories
Collections of packages are stored together in a repository.
On Ubuntu there are four official repositories: main, universe, multiverse and restricted. The ‘main’ repository holds all the packages fully supported in Ubuntu; in here you will find everything that a standard Ubuntu installation needs.
Universe holds considerably more and these are ‘community supported’. Don’t let the term put you off too much: there are many extremely useful (and perhaps even essential) packages in this repository.
The multiverse and restricted repositories hold packages that are affected by some licence or patent restrictions, mostly software associated with multimedia.
For the most part you never need to know any more about these repositories, as all are automatically enabled as part of the installation.
The function of a repository is not just to collect packages together, but to make package management work better.
An index is created of all the packages in each repository and stored on the computer. If you add or remove repositories, this index is updated to reflect the new status.
Consequently, the system knows about every package in every repository configured.
Since a package will list any others it depends on, APT can scan these lists to find and install those packages itself.
For instance, if you want to install the ‘Epiphany’ web browser, this depends on several other packages, such as ‘epiphany-data’ and ‘libmikmod2’.
There is no need for you to find and install these other packages; these are also in the repositories, so APT will download them for you.
If any of these packages depended on further ones, they too will be retrieved. Any package available in the Ubuntu repositories will have all its dependencies met, so any package can be installed with a command or click.
Article tags
Related articles
Q.How do I store musician and other information about...
Q.Why can't my browser find the website address I typed...
Q.All updates have been downloaded, so why won't Windows...
A technology for downloading files. Allows even very large files to be downloaded quickly.
|
|
|
|
|
Nikon Coolpix S570 BlackPrice: £66.99 |
Computeractive Ultimate Guide - Storage, Sharing & BackupPrice: £5.99 |
Back Issue CD-Rom 13 (2010)Price: £9.99 |
Hallmark Card Studio DeluxePrice: £15.31 |
Marine AquariumPrice: £15.41 |