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.

My laptop hard-disk has several OS partitions, e.g.
1. sda6 - 500gb (used for storing all my data)
2. sda3 - ubuntu 10.04
3. sda4 - linux mint
4. sda5 - ubuntu 12.04

I end up installing duplicate packages across all these similar operating systems.
How can I install the various packages e.g. 'vim', 'tmux', 'mutt' etc. only once,
i.e do only one time installation on disk?

That way, if I plan to reinstall Ubuntu, I don't have to reinstall all the packages.

As an analogy, on windows I can install a software on a usb stick, and can run it from there itself.
I can re-install windows or use a different version, but the software will still work.

share|improve this question

closed as too localized by Uri Herrera, Eric Carvalho, Radu Rădeanu, Thomas W., user68186 Jun 7 '13 at 13:00

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
You can not compare Windows with Linux/Ubuntu like that. You can not use the latest Office with Windows 98. It just refuses to run. What you want is not possible. Technically you could create a partition /usr/ and share it amongst the OS'es BUT that last installed OS will take precedence: the installer will overwrite all the 10.04 files in /usr with the 12.04 version since the latter is the newest. –  Rinzwind Jun 6 '13 at 7:49
    
If the binaries are compatible, you can mount a shared partition and link. But this assumes dependencies, locations, et al. are the same. Kernels, libc, anything could change. Better to record the packages you need via dpkg, etc. and reinstall when needed. –  belacq Jun 7 '13 at 1:06

1 Answer 1

You could try

dpkg -i --instdir=<folder> <package>

Where points to a shared partition e.g. sda6 which you mount in all OS. But I never tried this before in Linux, though it could work if all shared libraries are compatible.

share|improve this answer
    
How would that take care of the installation of the operating systems? –  Rinzwind Jun 6 '13 at 7:46
    
not at all ... but if it works in one OS and he is going to reinstall that OS, the package would still work. –  tombert Jun 7 '13 at 6:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.