sudo apt-get update is taking long time for following sites:

Get:17 http://archive.ubuntu.com precise/restricted Sources [5,470 B]                                                                                                               
Get:18 http://archive.ubuntu.com precise/universe Sources [5,019 kB]  
Get:21 http://archive.ubuntu.com precise/restricted i386 Packages [8,431 B]                                                                                                         
Get:22 http://archive.ubuntu.com precise/universe i386 Packages [4,796 kB]

Anyway to speed up this? Internet connection is good.


Go to Ubuntu Software Center > Edit > Software Sources and from Download From drop down menu choose Other then on the next window choose Select Best Server and wait to ubuntu recognize best server for you, then run apt-get update again...

Linked Question: - How do I change which mirror I get updates and software from?


You can try to delete more than ppas. You can try the following command: sudo apt-get clean. With Ubuntu Tweak, delete unnecessary files on the system.


This is command-line oriented answer (especially useful for speeding up provisioning VMs).

If you added new repository recently and you want to update partially, try:

find /etc/apt/sources.list.d -type f -name '*.list' -exec sudo apt-get update -o Dir::Etc::sourcelist="{}" ';'

It won't work in all cases (in case of more complex dependencies), but it's worth a try.

You can also try -d to download packages only. See: What does "sudo apt-get update" do?

Alternatively remove lines from apt list files which you don't need, e.g.:

sudo ex +'bufdo!%s/^deb-src/#deb-src/' -scxa /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-wine-*.list

which will comment out lines pointing to sources in those files.

Note: The :bufdo command is not POSIX.

Check also if you don't have any useless scripts in /etc/apt/apt.conf.d, e.g.:

sudo ex +"%s@DPkg@//DPkg" -scwq /etc/apt/apt.conf.d/70debconf

See:Disable prompts while installing a Debian package at SF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.