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.

17527 questions
817
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,609
561
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,926
540
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,898
449
votes
22 answers

Trouble downloading packages list due to a "Hash sum mismatch" error

When I check for updates, I get a "Failed To Download Repository Information" error. This is what comes up under details: W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources Hash Sum…
Rob
  • 12,820
383
votes
10 answers

How do I fix a "Problem with MergeList" or "status file could not be parsed" error when trying to do an update?

The computer gave me this output in a window: E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not…
user12250
376
votes
16 answers

Unable to correct problems, you have held broken packages

After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output…
trond
  • 3,785
298
votes
8 answers

How can I fix apt error "W: Target Packages ... is configured multiple times"?

I just installed Ubuntu Gnome 16.04. I told it to save my documents - which worked. Some software had to be reinstalled. Now when I run sudo apt-get update I see this: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in…
Tim
  • 32,861
  • 27
  • 118
  • 178
234
votes
17 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…
Lewis
  • 2,473
  • 3
  • 15
  • 5
223
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,095
200
votes
6 answers

How do I get and modify the source code of packages installed through apt-get?

I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them? I have a couple applications I use…
myusuf3
  • 34,189
197
votes
1 answer

What does -y mean in apt-get -y install command?

I always see commands like this apt-get -y install What is the -y tag for and what is the difference between apt-get install with and without the -y tag?
abdelrahman khaled
  • 2,081
  • 2
  • 11
  • 5
193
votes
7 answers

How do I make apt-get install less noisy?

If I use apt-get install -qq mono-devel, I expect it to be quiet except for errors, according to the help: -qq No output except for errors Instead I get: Extracting templates from packages: 100% Selecting previously unselected package…
jbtule
  • 2,030
186
votes
8 answers

Error :: You must put some 'source' URIs in your sources.list

I'm trying to install PIL a python module on ubuntu I first need to install a package called python-imaging using the following command sudo apt-get build-dep python-imaging When I try and do this I get the error E: You must put some 'source'…
david
  • 1,999
173
votes
4 answers

Will apt-get dist-upgrade upgrade my system to a newer version?

I am using Ubuntu 12.04 right now. If I use the command sudo apt-get dist-upgrade will that upgrade my Ubuntu to 12.10? Does that mean I won't be using the LTS version after that? I don't want to use Ubuntu 12.10 because I've already tried it and…
albilaga
  • 1,831
  • 2
  • 12
  • 4
140
votes
7 answers

Permission denied, are you root?

I get this error whenever I try to install programs using the terminal: home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory…
1
2 3
75 76