1

By default apt-get installs packages in the drive that the ubuntu installation resides on. But can i install a package other than the ubuntu partition ? If i can, how to do it ?

munir
  • 505

4 Answers4

2

It's not clear why you want this. If it's for space reasons, one viable approach would be to mount large directories (probably /bin or /usr, where many programs reside) in an extra partition. See e.g. this question: How can I store /var on a separate partition? for how to do that.

Christoph
  • 3,138
1

Another option beside the defunct link for another answer's "portable application" which seems to now correlate to the link below, which is a collection of single file AppImages, is to use the other portable package apps like Flatpak or Snap. With these you can symlink the dirs onto another partition.

https://sourceforge.net/projects/portable/files/64bit/

https://appimage.org/

https://flathub.org

https://snapcraft.io

alchemy
  • 850
1

Depending on the software, you may be able to find it as a portable application, which you could install wherever you want.

jrg
  • 61,707
mvario
  • 750
0

I have tried to figure out how to do this as well. I have read that you can only install on the default partition. This is because installing on other partitions can cause viruses or unwanted things on your computer. What I have done to get around this is to install the package on the default partition then add a script to the beggining of it that will move the files where you want the first time the program is started.

Takkat
  • 144,580