Score:2

How can I install a package on an external hard drive?

us flag

Okay, so the most frequent ask that I receive is always the same.

How can I install this program on an external hard drive?

Basically, in Windows, the users have an option to select the folder in where the program could be installed.

If someone goes to the store in ubuntu there is no option for this. If I try to use sudo apt-get install something I don't know if I have a flag to select a folder, not all the programs need to stay in an SSD someone is better to stay it in an HDD Disk.

So basically that its the question, how do I do it? It's a very frequent ask but I don't know how to do this.

Any suggestion it's a good idea, a package to install another package like Eddy or gdebi but with this option or whatever. I think that it's a very need it an option and I don't understand how no one thought in this before, I mean not all the people we have a huge SSD.

This problem appears with the deb packages, with snap and the flatpak. I know that you can extract a tar.gz in an external drive or use an Appimage but if the package doesn't use this format how do you do this?

Please tell me if I need to edit the post and sorry for my bad English, I'm learning the language too.

ChanganAuto avatar
us flag
Asked many times indeed and the answer is always the same: No.
Phosphorus avatar
us flag
@ChanganAuto I don't know maybe with a symlink or something else? but how do you know where are all the files of the package?
karel avatar
sa flag
Does this answer your question? [How to install packages to external drive (and run them)?](https://askubuntu.com/questions/938144/how-to-install-packages-to-external-drive-and-run-them)
cocomac avatar
cn flag
@ChanganAutoBut (without looking into it) I think it is very unlikely that it is completely impossible. You could answer explaining why it isn't practical to do, but simply "No" doesn't help the OP. But simply no doesn't really help anyone
Phosphorus avatar
us flag
Yes, exactly something like that @karel but with UI or with fewer steps? I mean usually when someone asks me this question they are Windows users. Usually, they don't use the terminal.
cocomac avatar
cn flag
@Phosphorus I realize that this isn't the answer you want... but on Linux, while some things (e.g., installing packages in a normal place) can be done from the GUI, some things, like this, are just easier to explain in a terminal. Think about how many desktop envoirnment there are... KDE Plasma, xfce4, GNOME. Having to explain for each one would take a while. It would be much faster to just write one answer for the terminal. Is it do-able with the GUI? Probobly. Is it harder to do and explain? Also probobly.
lnee avatar
td flag
you can install flatpak apps onto a usb using `flatpak create-usb`
lnee avatar
td flag
and also appimages by moving the file to the usb
vanadium avatar
cn flag
Does this answer your question? [How to install the software and place it on the HDD?](https://askubuntu.com/questions/1328200/how-to-install-the-software-and-place-it-on-the-hdd)
user535733 avatar
cn flag
The second half of the question seems to boil down to "Windows does it, so why can't Ubuntu?" which is a specious question. Debian-based systems require that packages use pre-defined install locations. Many of the benefits of using a Debian-based systems (small packages, few conflicts, reduced duplication, coordinated upstreams, reduced support costs, etc) flow from that design decision. You can install your software anywhere you wish...just use an install method other than deb or snap packages.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.