Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When a long list of new updates are available, I prefer to use a download manager in another computer to download .deb files of updates. Is there any easy way to get the direct download link of .deb files of all updates (from an update manager) in Ubuntu 12.10?

share|improve this question
up vote 4 down vote accepted

On the command line:

apt-get update
apt-get --print-uris upgrade

To extract the URLs from the output:

apt-get --print-uris --yes upgrade | awk '/^'\''/ {sub(/^./,"",$1); sub(/.$/,"",$1); print $1, $2}'

This snippet prints the URL for each package followed by the local file name. The local file name is usually the same as in the URL, but occasionally differs (I think only for packages whose version has an epoch).

If you can run wget on the computer with the network connection, use apt-zip Install apt-zip which automates this task: it provides a tool that generates a shell script to perform the download, and a tool to import the downloaded packages. You can use that script even on a Windows machine, with a port of Unix tools such as Cygwin.

share|improve this answer
your second command shows lines of links with several .deb file name at the end. so all the .deb file are not changed into links. just some. – user126106 Apr 29 '13 at 19:30
@CutieKrait I only did a smoke test, so my filter may well be wrong. I don't understand your problem report though. Can you give an example of it failing? – Gilles Apr 29 '13 at 19:33
eg this is a line of the output: ## http: // ristretto_0.6.3-1_i386.deb ## you see 2 .deb file only with one http://.. – user126106 Apr 29 '13 at 19:40
@CutieKrait That's what it's supposed to show! On each line, the first part is the URL, the second part is the local file name. – Gilles Apr 29 '13 at 19:47
thanks, now I can download them using 'Free Download Manager'. Much easier and faster. – user126106 Apr 29 '13 at 22:14

You can do this with synaptic,

sudo apt-get install synaptic

Click the buttons "Reload", "Mark All Upgrades", and then from the menu select File->Generate package download script.

Take the generated script and run it on another computer, and then use the menu option File->Add downloaded packages to install them, or do it manually with dpkg.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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