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 tools should use this tag.

learn more… | top users | synonyms (1)

847
votes
18answers
1.3m views

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?
641
votes
23answers
594k views

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 ...
406
votes
6answers
388k views

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 ...
387
votes
12answers
313k views

“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 The following packages have been kept back: gimp gimp-data libgegl-0.0-0 libgimp2.0 Why and how can I ...
367
votes
15answers
506k views

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 ...
312
votes
14answers
883k views

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 ...
300
votes
8answers
910k views

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 ...
284
votes
9answers
651k views

What does “sudo apt-get update” do?

I am wondering what sudo apt-get update does? What does it update?
266
votes
8answers
225k views

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-...
225
votes
12answers
161k views

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....
221
votes
2answers
441k views

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 ...' when I have known in advance that those packages are available. But how can I search for or get a list of ...
201
votes
4answers
200k views

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 update: apt-get upgrade: rimmer@rimmer-Lenovo-...
193
votes
6answers
226k views

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 --...
187
votes
5answers
167k views

How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement. For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong ...
176
votes
1answer
310k views

Installed Teamviewer using a 64-bits system, but I get a dependency error

I was trying to install Teamviewer, but I was getting a dependency error. I tried to install them, but with no luck. I'm getting this error: Unpacking teamviewer (from teamviewer_linux_x64.deb) ... ...
156
votes
10answers
202k views

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 ...
155
votes
5answers
192k views

How to Downgrade a Package via apt-get?

How to downgrade a package to an older version via apt-get?! Another tools are also accepted but apt-get is preferred.
154
votes
5answers
243k views

How can I fix a 404 Error when using a PPA or updating my package lists?

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown: W: Failed to fetch http://ppa.launchpad.net/ 404 Not Found How do I fix these errors?
153
votes
7answers
179k views

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?
147
votes
6answers
72k views

Is aptitude still considered superior to apt-get?

When I first started with Ubuntu using aptitude was the 'in-thing', with some stated improvements over apt-get. Am I correct in saying that apt-get has now 'caught up' with aptitude, and it makes ...
145
votes
25answers
238k views

How to fix Duplicate sources.list entry?

I keep getting this warning whenever I try to run sudo apt-get update. W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive....
141
votes
1answer
153k views

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?
112
votes
6answers
76k views

What is the easiest way to resolve apt-get BADSIG GPG errors?

I frequently cross this issue, and always have to google for an answer. Does anyone have a permanent fix for BADSIG errors from apt-get? W: GPG error: http://download.virtualbox.org lucid ...
112
votes
6answers
81k views

Why am I getting authentication errors for packages from an Ubuntu repository?

I'm experimenting with VPNs, so I wanted to install pptpd. john@desktop:~$ sudo apt-get install pptpd [sudo] password for john: <snip> The following extra packages will be installed: bcrelay ...
112
votes
2answers
90k views

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 with "apt-get policy", but how can I see all? Is ...
101
votes
7answers
99k views

Not enough free disk space when upgrading

I'm getting an error in software updater when I try and do my daily updates. it says: The upgrade needs a total of 25.3 M free space on disk `/boot`. Please free at least an additional 25.3 M of disk ...
101
votes
5answers
254k views

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 ...
97
votes
5answers
87k views

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 ...
95
votes
3answers
85k views

How do I re-run boot loader?

Running sudo apt-get -f install said that The link /vmlinuz.old is a damaged link and: you may need to re-run your boot loader[grub] Here's the full output: user@chrubuntu:~$ sudo apt-get -f ...
92
votes
9answers
133k views

How do you select the fastest mirror from the command line?

I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn't seem to be a simple ...
90
votes
2answers
20k views

Unable to find the .lit file reader app clit

I have some lit files I want to convert from Microsoft reader files to something my other devices can read. My friend says I should have clit, in $ which clit /usr/bin/clit but I cannot find it. I ...
85
votes
7answers
34k views

No more updates for Google Chrome | apt-get update error

I am using Google Chrome 48.0 32-bit. Today when I launched Google Chrome, I got this message: This computer will soon stop receiving Google Chrome updates because this Linux system will no longer ...
84
votes
3answers
171k views

What is the Difference Between `apt-get purge` and `apt-get remove`? [duplicate]

Possible Duplicate: What is the correct way to completely remove an application? Is there any difference between sudo apt-get purge <package-name> and sudo apt-get remove <...
84
votes
5answers
55k views

How do I show apt-get package management history via command line?

Is there a way to show the history of packages that were changed by apt-get via command line?
82
votes
4answers
175k views

Will apt-get dist-upgrade upgrade my system to newer version? [duplicate]

I am using Ubuntu 12.04 right now. If I use command sudo apt-get dist-upgrade will that upgrade my ubuntu to 12.10? Does that mean I am not using the LTS version after that? I don't want to use Ubuntu ...
82
votes
4answers
32k views

How to fix apt: Signature by key uses weak digest algorithm (SHA1)?

I started setting up by adding repositories and then went to run a sudo apt-get update again before I started installing other software, and I get the Signature key lines and it stops. So it ...
80
votes
7answers
87k views

My /boot partition hit 100% and now I can't upgrade. Can't remove old kernels to make room

My first issue was when i tried to apt-get update/upgrade. On upgrade I get the following error: You might want to run 'apt-get -f install' to correct these. The following packages have unmet ...
80
votes
2answers
34k views

What is the difference between dpkg and aptitude/apt-get?

When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude?
79
votes
9answers
52k views

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?
78
votes
3answers
185k views

How do I install svn?

I am trying to install svn and am running into issues. The command I am running is sudo apt-get install svn. When I run this, I get the error "Unable to locate package svn". Why is this? How do I ...
76
votes
4answers
21k views

apt-get update only for a specific repository

When I add a PPA and I want to install some of its content, it is quite annoying to re-update all my apt list using apt-get update. Is it instead possible to only sync the content of a given ...
75
votes
6answers
180k views

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 ...
71
votes
9answers
32k views

Generating list of manually installed packages and querying individual packages

I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that ...
71
votes
2answers
11k views

appstreamcli hanging with 100% CPU usage during update

appstreamcli is overheating my laptop by constantly using 100% of a core. My only solution is to kill it. Here's a screenshot of top: I can kill appstreamcli with either sudo kill pid or sudo ...
64
votes
10answers
103k views

How to create a local APT repository?

I would like to build my own local repository on my LAN, so that machines on the LAN can update and upgrade from it. I want to download the packages and store them on my local server so that I can ...
64
votes
3answers
21k views

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% ...
63
votes
1answer
145k views

How do “apt-get clean” and “apt-get clean all” differ?

What, if anything, is the difference between this command: sudo apt-get clean And this command: sudo apt-get clean all On my Lubuntu 12.04 system, simulating these commands reveals their ...
62
votes
5answers
7k views

Can I see why a package is installed?

For a specific package, can I find out why it is installed? So, can I see or it's manually installed, or that it is installed as a dependency of another package? Or that it is installed as part of ...
60
votes
5answers
25k views

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 ...
59
votes
3answers
49k views

How can I restore configuration files?

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file. Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-...