Questions tagged [apt]

APT is short for Advanced Packaging Tool, the package manager for Debian-based distributions. It is also the most used tool for installing packages in Ubuntu. Questions about using any of the apt commands should use this tag.

APT uses dpkg (Debian package management system) as a backend. APT downloads the package list, keeps track of all packages installed, solves dependencies and removes unnecessary packages. It also allows you to query the cache, upgrade packages, manage packages from multiple repositories, etc.

APT consists of a generic apt command, and several specialized subcommands:

  • apt: generic command line interface of apt, available from apt 1.0 (Ubuntu 14.04). Includes the functionality (in some cases limited) of several other utilities.
  • apt-get: the default package handling utility
  • apt-cache: query the apt cache
  • apt-key: manage the different GPG keys for repositories
  • apt-mark: to mark specific packages as automatically or manually installed
  • apt-config: to manage APT configuration.
  • apt-cdrom: manage CD-ROM entries

Questions about editing or configuring APT itself using the files in the directory /etc/apt (e.g. pinning) and questions about other directories that are also related to APT, and the usage of the different APT APIs, calls and libraries, like python-apt should all be tagged with .

There are other front ends for most of the functions of the commands included in the apt package, and each of these should be referred to by their own tag. The most common examples are: and .

The Debian wiki page for apt.

18082 questions
2721
votes
25 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
  • 58,745
1767
votes
29 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
  • 24,444
1684
votes
27 answers

How can PPAs be removed?

I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there. This is on a server system so a command line solution…
David Ashford
  • 17,878
1174
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?
1134
votes
20 answers

How can I update my nodeJS to the latest version?

I have installed nodeJS on Ubuntu with following code sudo apt-get install nodejs Since I am a new user for ubuntu I also ran this code too sudo apt-get install npm Now when I type nodejs --version It shows v0.6.19 I checked and saw latest…
1108
votes
7 answers

How to upgrade a single package using apt-get?

How do I update a single package? As far as man apt-get says apt-get upgrade doesn't take a package/list of packages as parameter: upgrade upgrade is used to install the newest versions of all packages currently installed on the system from the…
lurscher
  • 11,955
897
votes
9 answers

How do I search for available packages from the command-line?

I have successfully installed some packages using the command: sudo apt-get install packagename when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?
Mark Thomas
  • 9,145
894
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
  • 9,094
851
votes
4 answers

What is the difference between apt and apt-get?

I read about the new fancy progress bar which was added to apt 1.0 in Softpedia and how to enable it here. However on running sudo apt-get update, I did not see the fancy progress bars. On reading the second link again, the solution explicitly…
nik90
  • 12,959
712
votes
9 answers

What does "sudo apt-get update" do?

I am wondering what sudo apt-get update does? What does it update?
Elysium
  • 11,142
672
votes
15 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…
628
votes
16 answers

How do I fix the GPG error "NO_PUBKEY"?

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following: W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified…
Agmenor
  • 16,394
577
votes
2 answers

What is the difference between apt-get update and upgrade?

What is the difference between apt-get update and apt-get upgrade? Which should I run first? Do any of them automatically run the other?
Student
  • 12,236
548
votes
6 answers

What is "dist-upgrade" and why does it upgrade more than "upgrade"?

I was wondering why upgrade sometimes doesn't want to upgrade certain parts of the system, while dist-upgrade does. Here's an example after running apt-get upgrade: apt-get upgrade: rimmer@rimmer-Lenovo-IdeaPad-S10-2:~$ sudo apt-get upgrade Reading…
Frantisek
  • 8,998
473
votes
5 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
  • 29,406
1
2 3
99 100