Before upgrading to Ubuntu 13.04 I downloaded most of required .deb packages separately. Now I have a folder with a lot of .deb packages needed for upgrade.

How can I upgrade to Ubuntu 13.04 using terminal in a way that the upgrade process uses my downloaded packages and will not re-download them separately? (However it may need to download the packages that I have not downloaded.)

  • Have you tried to place them on /var/cache/apt/archives? It is where apt stores the downloade files. – Salem May 3 '13 at 10:50
  • @Salem: Can I be sure that placing them in /var/cache/apt/archives will prevent re-downloading? Is there any command for adding packages and then upgrading? – nano - merge me May 3 '13 at 10:53
  • 1
    See my answer. If you want to make sure apt works this way just download a small package deb (like sl), place it there and do a sudo apt-get install sl. You should see something like Need to get 0 B/??? kB of archives. – Salem May 3 '13 at 10:59

If you place the downloaded .deb's on /var/cache/apt/archives apt should use them instead of downloading all over again.

$ sudo cp /path/to/debs/*.deb /var/cache/apt/archives

Please note that by itself this does not prevent the download of some packages. If there is some missing dependency or there is a newer version of a cached .deb apt should download them.

If you want to make sure that no downloads are made use --no-download:

$ sudo apt-get upgrade --no-download


If you are going to update using do-release-upgrade you cannot use --no-download, but it uses the same path to store packages.

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.