Questions tagged [package-management]

Questions about the management of software packages, in particular the APT and dpkg systems. Use this tag for general questions about package management, and also for questions that cover or compare different packaging systems. For specific package tools, use their own specific tag (like apt, dpkg, snap etc.).

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.

10507 questions
756
votes
11 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
  • 10,301
384
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?
Raja G
  • 102,391
  • 106
  • 255
  • 328
304
votes
24 answers

How can I install software or packages without Internet (offline)?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?
akshatj
  • 13,226
134
votes
7 answers

What's the difference between package managers?

What are the differences between apt-get, aptitude, and synaptic, and which one is the recommended choice for normal day-to-day package management? This is a basic question, but I think it'd be good information to have on the site, and besides I am…
David Z
  • 10,301
126
votes
8 answers

How to fix "Package is in a very bad inconsistent state" error?

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager: Could not initialize the package information An unresolvable problem occurred while…
104
votes
5 answers

How to get a list of installed packages held back from upgrade?

Recently, I needed to get a list of packages that were installed on my Ubuntu system which were also put on hold for upgrade. The 'hold' status for a package means that when the operating system is upgraded, the installer will not upgrade these…
pmagunia
  • 1,522
92
votes
4 answers

How can I tell what package requires a reboot of my system?

I have unattended-upgrade set up on my Ubuntu systems. Occasionally I will log in remotely to one of them and I'll see a message informing me that I need to reboot the system (in order to complete an upgrade). Is there a way to determine the…
belacqua
  • 23,120
78
votes
4 answers

Requires installation of untrusted packages?

I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error. I searched for hours for a solution to this problem, and finally came upon a suggestion that said to change servers for downloading updates…
Isaiah Bugarin
  • 1,175
  • 2
  • 12
  • 19
65
votes
5 answers

Can I purge configuration files after I've removed the package?

I was doing a package removal with apt-get remove but then realized I should have done a --purge along with it to remove the configuration files. Can I remove the packages configuration files easily or do I need to reinstall the package and then…
Jorge Castro
  • 71,754
59
votes
6 answers

Is it possible to view the contents of a debian package?

I want to see the contents of a debian package, especially if the package is properly cleaning up whatever it installs. I want to also see how it goes about installing the software, what directories it creates, symbolic links etc.
Blankman
  • 8,275
59
votes
9 answers

How can I check if a package is installed (no superuser privileges)?

At our university we can get almost any ubuntu package installed we want, but we are not superusers ourselves (we need to request packages being installed). With some libraries it is not always easy to know whether the package is already installed…
Peter Smit
  • 7,587
58
votes
8 answers

Getting 'Release is not valid yet' while updating ubuntu docker container

I am trying to update a ubuntu container with a dockerfile. RUN apt-get update -y But I am getting the below error. E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 9h…
Shash
  • 1,001
54
votes
1 answer

What exact purpose do transitional packages have?

What are transitional packages and what exact purpose do they have?
NES
  • 33,195
50
votes
4 answers

Where are my installed applications?

I have installed Skype in Ubuntu, but I do not know where to start the installed the Skype application .Similarly I have installed Netbeans and other applications but their icons are not appearing in any menus. Related: how to uninstall already…
Hemanth
  • 1,045
49
votes
7 answers

How do I list installed software with the installed size?

I would like to have a list of the installed software on my machine, with the disk space consumed by them alongside. I would prefer to be able to order by largest/smallest, but that is not a necessity. I am the sort of person who will install…
1
2 3
33 34