Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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 '*'

share|improve this answer
add comment

Your Answer

 
discard

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.