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
  • Without some extremely advanced skills in remapping various folders to external storage and partitions, it is not normal in Ubuntu-land to put everything into other partitions. And the more partitions/disks you include in your setup the more points of failure you have where you run into single points of failure (extra partitions). – Thomas Ward Sep 18 '22 at 02:10
  • See the Filesystem Hierarcy Standard at https://refspecs.linuxfoundation.org/fhs.shtml, or read man hier.

    It explains where things go.

    – waltinator Sep 26 '23 at 17:19

4 Answers4

0

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
  • 762
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
  • 142,284
0

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

jrg
  • 60,611
mvario
  • 742
0

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,108