Install snaps in custom location

Hello everyone, I just joined today.

I have little space on my root folder, so I was wondering if I can install the snaps in a folder inside my /home.

I have a flatpak folder in my home directory to install all the stuff using the --extra command.

I would like if I can do the same. I have looked in the forum and the tutorials, I haven’t found that option or I might be clueless about.
My /home folder is inside a bigger disk, when snap ins installed it takes a huge amount of space, so I was looking the option that instead of installing in the /var folder I could install it in a custom location as well or a appimage could be very useful.

3 Likes

Unfortunately there is no such option in snapd to do this automatically, however you should be able to migrate the /var/lib/snapd folder to another disk and setup automatic bind mounts from /var/lib/snapd to that other disk with an entry in an fstab.

1 Like

I second the message of user TacoBarato.

Are there plans to provide at least an option inside a .conf file to set the default installation and/or working directory for snaps?

A practical example:
I’m trying to run a snap application (microk8s) on an AWS instance but I kept running out of space on /, while I have more than enough space on /home.