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.

18114 questions
301
votes
6 answers

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

I'm trying to run this command in the terminal: sudo apt install software-properties-common This is the error message I get: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the…
GoodNite
  • 3,011
297
votes
3 answers

Error sudo: add-apt-repository: command not found

I’m running Ubuntu 14.04. When I run: sudo add-apt-repository ppa:ubuntu-wine/ppa I get the following error: sudo: add-apt-repository: command not found I tried to run sudo apt-get install software-properties-common but it shows:…
Nhóc Emi
  • 2,971
260
votes
12 answers

How do I install a different Python version using apt-get?

How can I install a different version of Python using apt-get? Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely…
AgileZebra
  • 2,703
256
votes
12 answers

How to uninstall LibreOffice?

Which package should I remove to completely remove libreoffice? I have no need for office tools. That's the one gripe I have with package managers like apt, there's no simple way to perform the essential task of removing unwanted software :S
lapin
  • 2,825
256
votes
9 answers

Is it possible to get a list of most recently installed packages?

Is it possible to get a list of packages that were most recently installed through apt-get?
254
votes
2 answers

What are phased updates, and why does Ubuntu use them?

So I ran into that weird "packages being held back" problem while updating my system using apt . After some research, it appears to be the result of "phased updates". What are phased updates, anyway? Why does Ubuntu use them? How do they benefit me?…
ArrayBolt3
  • 7,832
247
votes
19 answers

apt-get update fails to fetch files, “Temporary failure resolving …” error

Err http://archive.canonical.com natty InRelease Err http://security.ubuntu.com oneiric-security InRelease Err http://extras.ubuntu.com natty InRelease Err http://security.ubuntu.com oneiric-security Release.gpg Temporary failure resolving…
Lewis
  • 2,603
  • 3
  • 16
  • 5
247
votes
8 answers

apt-key deprecation warning when updating system: "Key is stored in legacy trusted.gpg keyring"

Recently I've noticed some issues when running apt where the system will warn me of a keyring deprecation: Reading package lists... Done Building dependency tree... Done Reading state information... Done 8 packages can be upgraded. Run 'apt list…
matigo
  • 25,236
246
votes
8 answers

How can I remove gpg key that I added using apt-key add -?

I don't need the key in my server's keyring anymore. Is it possible to remove it? I added the key using this command: curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - Thanks for helping
Raymond
  • 2,575
240
votes
23 answers

sudo apt update error: "Release file is not yet valid"

I keep getting this error every time I try to sudo apt update : Hit:1 ubuntu bionic InRelease Ign:3 linux/chrome/deb stable InRelease Get:2 /ubuntu bionic-updates InRelease [88.7 kB] Get:5 /linux/chrome/deb stable Release [943 B] Get:6…
user897956
238
votes
8 answers

How can I get apt to use a mirror close to me, or choose a faster mirror?

Downloading from the main Ubuntu archive is slow even when it's not release day, how can I get apt-get to automatically use a mirror that is close to me?
ajmitch
  • 19,219
235
votes
2 answers

What is difference between the options "autoclean", "autoremove" and "clean"?

apt-get has a few options which looks the same to me: autoclean , autoremove and clean . What do each of them do?
Antony
  • 3,265
234
votes
5 answers

What can I do if a repository/PPA does not have a Release file?

When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: How can I fix a 404 Error when using…
Addem
  • 2,613
233
votes
4 answers

Why is Ubuntu moving to Snap packages?

Why Ubuntu dumping .deb packages and moving to .snap packages? At least for now they are keeping .deb package for normal distributions. .deb is already the most popular packaging format out there. This gives an idea about what the Snap package…
Vishnudev K
  • 2,806
224
votes
9 answers

What does this apt error message ("Download is performed unsandboxed as root...") mean?

I get it after updating in Synaptic Manager I recently did a clean install of Ubuntu 17.04 from 16.10. error message:- W: Download is performed unsandboxed as root as file…