If you use Ubuntu Linux, you have likely noticed a folder named simply “snap” sitting directly in your primary Home directory. If you are a neat freak who likes keeping your Home directory meticulously organized (Downloads, Documents, Pictures, etc.), you might have tried to delete this folder. However, the next time you install a Snap package or reboot your computer, the snap folder automatically regenerates itself.
This folder is hardcoded into the snapd package manager daemon. It is required to store application-specific user data and configuration files for snap packages. Because the developers of snapd stubbornly refuse to follow the XDG Base Directory Specification (which mandates that hidden config files should go in ~/.config/), the snap folder is permanently bolted into your visible Home directory.
While you cannot technically stop the daemon from creating the folder without completely uninstalling the Snap ecosystem, you can use a hidden text file to trick the Nautilus file manager into hiding the folder from your view permanently.
How to Hide the Snap Folder in Ubuntu
You must create a hidden .hidden text file to instruct the file manager to ignore the snap directory.
- Open your terminal application (
Ctrl+Alt+T). - Navigate to your Home directory (you should be there by default, but you can type
cd ~to be sure). - Use the
echocommand to append the word “snap” into a hidden file named.hiddenby running the following command:
echo "snap" >> ~/.hidden
- If you currently have the Nautilus file manager open, close it completely.
- Reopen the Files (Nautilus) application.
The snap folder will immediately vanish from your view. The folder still exists on your hard drive, and all your Snap applications will continue to function perfectly, but the annoying folder will no longer clutter your pristine Home directory.