Ubuntu – Install package to specific location

apt

I want to install Steam for Linux. As I have only 256gb SSD and not enough space for games, I'd like to install it (and all it's games) to a USB3 flash drive.

How to do that? Preferably using sudo apt-get install ****. Haven't find a way to specify the installation location.

Best Answer

I think the major problem is the size of the games and not the size of Steam.

Install Steam as usual on your SSD. The Games are installed in ~/Steam/SteamApps/common/TITLE

Backup the "common"-Folder and delete it. Then make a symlink to your USB-Drive like this:

ln -s /media/<usb-drive>/steamgames/common ~/Steam/SteamApps/common

Now the games should be installed on your USB-Drive. I don't really know if it works, but you can give it a try.