Reconfigure storage location/partition to avoid duplications

Asked by Sven

Hey,

I have a system used by multiple users. Now, after upgrading to focal, my home directory is cluttered with an ugly "snap" folder which shouldn't be there and deleting it (which was done by another user in his home directory) leads to slooow app starts. And the home partition is getting full because it seems like somebody had the awesome idea to store and duplicate binaries ...

So: how can I move that folder to a place where it belongs to (basically on the root partition)? A quick google investigation showed that it can't be renamed (like to ".snap" or how every normal developer would do that), but the duplication of files for every user (and the need to update them for every user, which is bad for bandwith/traffic) seems to be a much bigger issue. It should be shared.

Or, other question, if the devs forgot about the option: Is it possible to just compile that thing with a different location (like /opt or so) and replace the existing one?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu snapd Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

see the discussion in Bug #1575053

And to the bandwith/traffic issue: The snap binaries are stored elsewhere, and an upgrade works for everybody at once and need not be done again by every user.

Revision history for this message
Sven (s-v-e-n) said :
#2

Hm, thank you for your answer. Yeah, found that one, but that's just about the leading dot.

I'm irritated, as that snap directory weights 7.6 GB just by having Chromium within. For a browser, so not sure where that stuff is stored, but something weird _is_ in home. Checked, /snap has 7.1 GB, looks like it duplicated everything from the root dir (another duplication ... awesome).

Why, just: why? Looks to me like snap wasn't really thought through.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Don't confuse the different directories that are involved.

The real snap binaries are stored in /var/lib/snapd/snaps and they are loop mounted (made accessible without duplicating) to /snap

I suggest hat you check what there is in /home/username/snap before you start blaming the developers

Revision history for this message
Sven (s-v-e-n) said :
#4

Checked:

sven ~ $ df -h .
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/home/sven/.Private 874G 802G 71G 92% /home/sven
sven ~ $ rm -rf snap
sven ~ $ df -h .
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/home/sven/.Private 874G 795G 79G 92% /home/sven

Looks like dropping the snap directory in my home frees up the space on this partition. Not sure what's the ~/snap/chromium/common/chromium/Default/File System stuff is, however, could be that the devs wouldn't call that files exactly "binary", but for me as an end user, it just doesn't make any difference.

Can you help with this problem?

Provide an answer of your own, or ask Sven for more information if necessary.

To post a message you must log in.