11

I need to download all packages I already installed on Ubuntu 11.10 x64. There should be in /var/cache/apt/archives I know, but there are only 300 Mb of deb files. I installed a lot of development packages that there are not there right now. I think system cleans the cache automatically!

Now I want to download all packages installed on system, else than packages that are installed by default.

1 Answer 1

17

The following command in the terminal grabs the list of installed packages and downloads, packages will be stored at /var/cache/apt/archives

dpkg -l | grep "^ii"| awk ' {print $2} ' | xargs sudo apt-get -y --force-yes install --reinstall --download-only
4
  • Can re-installation cause some problem in system? like missing configuration of packages?
    – sorush-r
    Dec 9, 2011 at 14:07
  • 2
    Oh! the --download-only flag... Thanks :-)
    – sorush-r
    Dec 9, 2011 at 14:08
  • I run this command but my system hanged after running it for 1 hour and i restart the system, Do I have to start again or some of packages will be work on other system when i copy and run?
    – xkeshav
    Aug 18, 2014 at 5:03
  • I get messages like Reinstallation of chroot is not possible, it cannot be downloaded....
    – user541686
    Nov 19, 2020 at 11:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .