The reason I am asking this question is I am concerned about simple rollback (I already read how to find out what packages were installed). So I would like to set global (per entire system) option, that forces system to store each package before installing/updating it.

With such workflow, I could update whatever I want, and if for example the newest version of Dolphin would be worse than previous one I could simply go to directory with stored packages and install previous version instead (the previous version is either base version -- on ISO -- or version from previous update).

Is there such feature as global option to automatically store each package before install? It have to be guaranteed that no package is updated on-fly, i.e. without being stored before.

I am learning LMDE, but answer for any .deb based system would be fine -- Ubuntu, Debian, you name it.


By default, apt leaves packages in /var/cache/apt/archives until you run apt-get clean. aptitude also lists a clean option in its manpage, so I assume it works the same way. Make sure there isn't a cron job in one of the /etc/cron* folders/files that cleans it on a regular basis and packages should stay there forever. If you're using some other package manager, your mileage may vary. According to the manpage, dselect automatically cleans the directory for you when it is set to use apt for installing packages.

All the packages you install with apt or aptitude are downloaded to that directory before installing. If you install a package you downloaded manually (say, with dpkg) you'd have to move the file there yourself.

  • AFAIK, there is no guarantee this directory won't be erased in case -- for example -- the disk space is running out. And I need guarantee that the files will be kept, unless I explicitly delete them. Jan 5 '11 at 6:16
  • no process is purging this cache-dir automaticly (besides "aptitude clean" and "apt-get clean").
    – ThorstenS
    Jan 5 '11 at 22:22

With Debian, you can use http://snapshot.debian.org/

For other distros, you need to copy the contents of /var/cache/apt/archives before downloading the newer versions; that is, before apt-get upgrade (apt-get update won't change its contents).

  • Well, I cannot use remote repository, because I would need online connection to it -- think about rolling back package which establishes such connection. Jan 5 '11 at 6:17

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.