I currently have a separate partition for / and /home. However, in the past I've had a separate /usr for all my installed programs. Whenever I change between similar OSs (eg Mint and Ubuntu) I simply reinstall and format my / only, keeping files and programs. I am looking for a way to migrate all my programs to /usr without having to redownload packages.


If you kept the same copies of the files in /usr, that would be unlikely to work correctly, and to some extent it would defeat the purpose of installing a new OS. For Linux, a "new OS" essentially means a new version of the files in /usr, so you would be missing out on any improvements or vendor customizations that were made to those programs, and you would have no guarantee that they would be compatible with the configuration files stored in /etc, log files in /var, etc.

However, something similar can be done which is safer and more useful: you can save off the list of all currently installed packages and then restore that list after you install the OS:

Restoring all data and dependencies from dpkg --set-selections '*'

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.