Questions tagged [package-management]

Questions about the management of software packages, in particular the APT and dpkg systems.

A package management system allows users to install, update, remove and get information about software installed on a system. Since many programs use shared libraries, a key task of package management is to resolve dependencies so that when the user installs a package any dependencies are pulled in too, and that when a package is removed, packages that depend on it are removed to prevent them from breaking.

The need for a package management system arises from the dynamic software landscape of the Linux world, allowing users to benefit from the active development of applications from many sources. It also provides security since signed packages downloaded from repositories are automatically checked against keys on the local system.

Ubuntu has inherited Debian's package management system, consisting of dpkg, a lower-level utility that installs and removes packages and checks dependencies at install time, and APT (Advanced Package Tool) which fully resolves dependencies by finding the needed packages, and fetches updates. Users can use apt and dpkg commands to query and update the database of software available in repositories and installed on the system, to install or remove software and upgrade installed packages, and clean up obsolete programs. Graphical front-ends for the APT system are also present in all versions and flavors of Ubuntu.

In additional to using Ubuntu repositories, APT can manage software from external repositories added by users such as PPAs. Normally, Ubuntu repositories are specified in /etc/apt/sources.list and external sources in files in /etc/apt/sources.list.d

Users may also install .deb packages from other sources using dpkg and its graphical front-end Gdebi.

Software may also be compiled from source. Developers generally provide scripts with the source code to set up a build environment checking for dependencies (which the user has to resolve by installing more packages), but after installation the package will not be known to dpkg, so must be maintained, updated and removed by the user. The same is true for precompiled binaries or scripts placed in the system by the user directly.

Resolving dependencies is always a challenge. In 16.04 Ubuntu has introduced an innovation, snap packages, which bypass the problem entirely; instead of using shared libraries, they are packaged and installed with all their dependencies included. Using shared libraries is more efficient in terms of storage, so snaps take up more space.

For more information see the Debian wiki package management section and links there to the Debian Reference Manual.

9897 questions
2467
votes
24 answers

How to list all installed packages

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. How would I do this?
Ivan
  • 54,329
  • 64
  • 150
  • 210
1366
votes
26 answers

"The following packages have been kept back:" Why and how do I solve it?

I just added a PPA repository for the development version of the GIMP, but I get this error: $ apt-get update && apt-get upgrade ... The following packages have been kept back: gimp gimp-data libgegl-0.0-0 libgimp2.0 Why and how can I solve it so…
jfoucher
  • 19,784
  • 8
  • 28
  • 29
1154
votes
25 answers

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

I get this error when trying to use apt-get: E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? How can I fix this?
La Ode Adam Saputra
  • 11,833
  • 3
  • 15
  • 8
848
votes
9 answers

How to install updates via command line?

When I log into my web server via SSH I see the information: 88 packages can be updated. 80 updates are security updates I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install…
Marlin
  • 8,634
  • 3
  • 13
  • 5
706
votes
9 answers

What is the correct way to completely remove an application?

I've searched the net for such information and found different command lines, like these ones: sudo apt-get remove application sudo apt-get remove application* sudo apt-get remove --purge application sudo apt-get remove --purge application* sudo…
user48949
  • 7,493
  • 4
  • 15
  • 13
676
votes
10 answers

How do I find the package that provides a file?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is. Bonus question: what if it's a…
David Z
  • 9,391
  • 5
  • 26
  • 22
645
votes
14 answers

How do I resolve unmet dependencies after adding a PPA?

Occasionally, when I'm installing stuff, I get an error like the following: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages…
jrg
  • 58,933
  • 52
  • 169
  • 246
529
votes
6 answers

How do I get a list of installed files from a package?

I want to know where I can find my installed application when I installed it on Ubuntu using package manager. I installed RabbitMQ and ran locate rabbitmq which gave me following…
Anupam Gupta
  • 5,413
  • 3
  • 7
  • 6
508
votes
15 answers

How to prevent updating of a specific package?

Because of bug #693758 I'd like to prevent apt-get upgrade and Update Manager from updating the "libgtk2.0-0" package. How can this be achieved?
Ivan
  • 54,329
  • 64
  • 150
  • 210
489
votes
12 answers

How to install software or upgrade from an old unsupported release?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found: $ sudo apt-get install vlc Reading package lists... Done Building dependency…
440
votes
2 answers

How to install specific version of some package?

My questions are divided into two parts: How to know the version of installed package? How to install a specific package version?
user254258
401
votes
6 answers

How to downgrade a package via apt-get?

How can I downgrade a package to an older version via apt-get? Other tools are also acceptable but apt-get is preferred.
user61928
387
votes
10 answers

How can I install just security updates from the command line?

sudo apt-get upgrade installs all updates, not just security updates. I know that I can use Update Manager to select only important security updates, but is there a way to do this from the command line?
crenshaw-dev
  • 27,548
  • 9
  • 41
  • 47
385
votes
4 answers

How can I see all versions of a package that are available in the archive?

Is there a way I can see all the versions that are in the archives that I have configured in sources.list. I can see the last version of each archive withapt-get policy, but how can I see them all? Is there any way that this can also include PPA and…
txwikinger
  • 26,994
  • 10
  • 75
  • 99
360
votes
7 answers

How can I check the available version of a package in the repositories?

How can I check the version of the available package in the Ubuntu repositories without installing it?
rɑːdʒɑ
  • 97,211
  • 101
  • 250
  • 322
1
2 3
99 100