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.

17215 questions
2560
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
  • 55,987
  • 65
  • 150
  • 212
1621
votes
28 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
  • 22,644
  • 8
  • 29
  • 29
1603
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,058
  • 3
  • 22
  • 19
1168
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,973
  • 3
  • 16
  • 8
1094
votes
17 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…
Kanishka Panamaldeniya
  • 11,063
  • 3
  • 14
  • 11
1053
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,385
  • 5
  • 23
  • 28
870
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,854
  • 3
  • 14
  • 5
855
votes
9 answers

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

I have successfully installed some packages using the command line '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
  • 8,665
  • 4
  • 15
  • 9
797
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,399
  • 10
  • 44
  • 71
694
votes
9 answers

What does "sudo apt-get update" do?

I am wondering what sudo apt-get update does? What does it update?
Elysium
  • 10,912
  • 24
  • 56
  • 81
663
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
  • 60,101
  • 54
  • 172
  • 246
599
votes
14 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
  • 15,924
  • 18
  • 67
  • 103
558
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?
The Student
  • 11,786
  • 27
  • 61
  • 94
534
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,828
  • 11
  • 29
  • 35
449
votes
9 answers

How do I install Python 3.6 using apt-get?

I've tried the normal way, sudo apt-get install python3.6, but... well... that didn't work. So, how would I go about it? (I'd preferably not build it on my own) I'm using Ubuntu 16.04.
Olian04
  • 4,633
  • 3
  • 11
  • 16
1
2 3
99 100