How can I change or hide the ~/snap directory?

So..

A1: No; ~/snap is not supposed to be accessed manually on a daily basis; it's a settings directory.

A2: No; ~/snap cannot be changed; it's cluttering your home dir by design.

However there is already a bug report on this issue, but it's currently only prioritized as wishlist. If you're affected by this bug (and you are if you have a ~/snap =) then let the kind developers know, and encourage them to fix the bug by raising its significance:

  1. Go to the bug report
  2. Login to Launchpad (top right corner).
  3. Click This bug affects N people. Does this bug affect you? (near top left)
  4. Click Yes, this bug affects me

In the meantime do like @Rinzwind suggests and simply hide the directory from Nautilus by typing this in a shell:

echo snap >> ~/.hidden

Alternative get completely rid of snap by downright uninstalling everything related snap, as described here.


Q1: Have I misunderstood this directory? Is ~/snap really a directory which I'm supposed to enter and access on a daily basis on a par with ~/downloads, ~/work, ~/tmp, etc?

It is a regular directory but is not really meant for user access. It is managed by the snapd utility. It seems likely it will be renamed to ~/.snap at some point. Or less likely to ~/.local/share/snap.

Q2: In any case: How do I hide it?

When it is renamed it will be hidden automatically.

To hide from the desktop shell for now, create a text file called ~/.hidden and put the word "snap" in it. This will hide the "~/snap" folder from Nautilus.

To hide from the command line for now, alias ls to ls -Isnap. Now "snap" will be ignored when ls-ing.


All snap applications themselves (in case they are installed) are located in the /snap directory.
/home/user/snap contains your personal settings of those snaps (in case they are installed).
The /home/user/snap folder was created once when you've installed the first snap package.

In case you don't have snap applications installed, you can delete the /home/user/snap folder.
If you install and use new snap applications, the folder will be re-created - this is done by design.
As snapd is "work in progress" - maybe another default directory can be selected in the future.