How to save applications for re-install or upgrade?
I keep experimenting with my Ubuntu so I have to reinstall it sometimes.
I just wanted to know whether I can create another partition only for my installed application(from software center) so that I can modify my system but have the application folders (I guess /var/cache/apt
and /usr/bin
) be safe and I can again use the applications after a reinstall or upgrade?
NOTE: I already have a different partition for my /home
folder.
Solution 1:
It does not work like that in Ubuntu (and in Linux in general).
Unlike Windows, Ubuntu does not keep all the files needed for an application in a single folders. Rather it shares common files needed by the system as well as other apps. So, files are stored in folders for different types of common files/libraries.
The default installation of Ubuntu contains a fair share of applications, such as LibreOffice. These will get reinstalled / upgraded in the default location.
As a result, the additional apps (those installed afterwards) probably will get into dependency issues if you put them in a different partition, as there will be two sets of /usr/bin
etc. and the files won't be in sync. So, if you use the set in the root (/
) partition the system and the default applications will work but the applications in the other partition may not, and if you try to use (mount) the ones in the other partition, the system and the default applications will break as they will try to use the older libraries.
See Backing up third party apps before reinstalling Ubuntu for alternate means of saving application lists and re-install in one go.
Hope this helps