Ubuntu has some snap apps (e.g., Firefox and AppCenter) pre-installed in recent releases. The snap apps auto-generate a snap folder in user’s home directory to store app data, caches, and configuration files.
If you don’t want to see that folder, you may hide it or move to another location. And, here’s how to do the trick step by step in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 24.10.
Method 1: Set ‘snap’ as hidden folder
As you may know, Linux files/folders with dot (.) at the beginning of their names are hidden by default. User can view or hide them again by pressing Ctrl+H keyboard shorcut.
Without renaming, another way to hide files/folders is create a .hidden file in the same directory of files/folders that you want to hide, then write the names (one per line) into that file.
1. First, search for and launch “Text Editor”.
2. Then, create an new empty document if the text editor does not open one. In the empty document, write snap.
Finally, press Ctrl+S to open the save as dialog, set file-name to .hidden and save to your user Home directory.
When done, press Ctrl+H in user home to verify the .hidden file and press Ctrl+H again to hide. The snap folder should disappear if everything goes well.
Method 2: Move ‘snap’ folder to ~/.snap/data
Ubuntu introduced an experimental feature to move that “snap” folder into the hidden ~/.snap/data
3 years ago. According to this thread, it will eventually the default behavior.
The experimental hidden-snap-folder flag will remain for the foreseeable future, allowing users the option to move ~/snap to ~/.snap/data, effectively hiding it. This will eventually be made into the default behaviour, unless a compelling reason not to do it is discovered during the ongoing experimental phase.
If you want to try out this feature to move snap folder, just open terminal (Ctrl+Alt+T) and run command:
sudo snap set system experimental.hidden-snap-folder=true
After that, newly installed snap apps will generate app data, caches, and configuration files in ~/.snap/data/app-name
directory instead of snap sub-folder in user home.
However, for existing snap apps, you need to remove then re-install them to apply the change. You may use snap list
command to list all installed snap apps, then reinstall via similar commands below. For example, remove & re-install Firefox:
sudo snap remove firefox && sudo snap install firefox
NOTE: You need to manually migrate the leftover app data (if important) from the original ‘snap’ folder to new ‘.snap/data’ directory.
To disable this experimental feature, just use command:
sudo snap unset system experimental.hidden-snap-folder
Again, you need to re-install the Snap apps to make it work, and leftover data need to be manually migrated back.