Score:0

Can I install snaps only in my home directory?

kp flag

I am running Ubuntu 22.04 on my laptop with dual boot. When I initially installed it, I only assigned 30GB to the root partition, which has now proved to be insufficient. Looking over unnecessary things to delete I noticed that the /var/lib/snapd/snaps directory takes up a lot of space.

Why must these packages be in the root directory? Is there a way to keep all the snap related stuff in my home directory, which has way more space assigned to it? I am the only user in my Ubuntu system, so it doesn't really matter to install things between multiple users.

Edit: Ubuntu version is 22.04

pl flag
In short, no. You could move them to a folder in your home partition and bind mount that to `/var/lib/snapd/snaps`, but it's probably quicker and easier to reinstall with one big partition or resize root.
pl flag
Another option would be to steal a bit of your home and create a new `/var` partition and keep your snaps in that. Either way there's some repartitioning needed.
pl flag
Here's a guide which may be useful. https://askubuntu.com/questions/39536/how-can-i-store-var-on-a-separate-partition/39542#39542
I sit in a Tesla and translated this thread with Ai:

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.