{"id":48272,"date":"2025-03-04T08:17:05","date_gmt":"2025-03-04T08:17:05","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=48272"},"modified":"2025-03-04T08:26:47","modified_gmt":"2025-03-04T08:26:47","slug":"hide-snap-folder-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2025\/03\/hide-snap-folder-ubuntu\/","title":{"rendered":"How to Hide &#8216;snap&#8217; sub-folder in Home folder in Ubuntu 24.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-48273\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo-700x700.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>Ubuntu has some snap apps (e.g., Firefox and AppCenter) pre-installed in recent releases. The snap apps auto-generate a <b>snap<\/b> folder in user&#8217;s home directory to store app data, caches, and configuration files.<\/p>\n<p>If you don&#8217;t want to see that folder, you may hide it or move to another location. And, here&#8217;s how to do the trick step by step in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 24.10.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-48274\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder-700x455.webp\" alt=\"\" width=\"610\" height=\"397\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder-700x455.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder-300x195.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder-768x500.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/snap-folder.webp 956w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<h3>Method 1: Set &#8216;snap&#8217; as hidden folder<\/h3>\n<p>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 <b>Ctrl+H<\/b> keyboard shorcut.<\/p>\n<p>Without renaming, another way to hide files\/folders is create a <b>.hidden<\/b> file in the same directory of files\/folders that you want to hide, then write the names (one per line) into that file.<\/p>\n<p><b>1.<\/b> First, search for and launch &#8220;Text Editor&#8221;.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/04\/open-texteditor.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43854\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/04\/open-texteditor.webp\" alt=\"\" width=\"480\" height=\"270\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/04\/open-texteditor.webp 480w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/04\/open-texteditor-300x169.webp 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p><b>2.<\/b> Then, create an new empty document if the text editor does not open one. In the empty document, write <b>snap<\/b>.<\/p>\n<p>Finally, press <b>Ctrl+S<\/b> to open the save as dialog, set file-name to <b>.hidden<\/b> and save to your user Home directory.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-48277\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap-700x383.webp\" alt=\"\" width=\"610\" height=\"334\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap-700x383.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap-300x164.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap-768x421.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/hidden-snap.webp 935w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>When done, press <b>Ctrl+H<\/b> in user home to verify the .hidden file and press Ctrl+H again to hide. The snap folder should disappear if everything goes well.<\/p>\n<h3>Method 2: Move &#8216;snap&#8217; folder to ~\/.snap\/data<\/h3>\n<p>Ubuntu introduced an experimental feature to move that &#8220;snap&#8221; folder into the hidden <code>~\/.snap\/data<\/code> 3 years ago. According to <a href=\"https:\/\/forum.snapcraft.io\/t\/experimental-flag-for-hiding-snap\/28509\" target=\"_blank\" rel=\"noopener\">this thread<\/a>, it will eventually the default behavior.<\/p>\n<blockquote><p><i>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.<\/i><\/p><\/blockquote>\n<p>If you want to try out this feature to move <b>snap<\/b> folder, just open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre>sudo snap set system experimental.hidden-snap-folder=true<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/exp-hiddesnap.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-48276\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/exp-hiddesnap-700x437.webp\" alt=\"\" width=\"610\" height=\"381\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/exp-hiddesnap-700x437.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/exp-hiddesnap-300x187.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2025\/03\/exp-hiddesnap.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>After that, newly installed snap apps will generate app data, caches, and configuration files in <code>~\/.snap\/data\/app-name<\/code> directory instead of <b>snap<\/b> sub-folder in user home.<\/p>\n<p>However, for existing snap apps, you need to remove then re-install them to apply the change. You may use <code>snap list<\/code> command to list all installed snap apps, then reinstall via similar commands below. For example, remove &amp; re-install Firefox:<\/p>\n<pre>sudo snap remove firefox &amp;&amp; sudo snap install firefox<\/pre>\n<p><b>NOTE: You need to manually migrate the leftover app data (if important) from the original &#8216;snap&#8217; folder to new &#8216;.snap\/data&#8217; directory.<\/b><\/p>\n<p>To disable this experimental feature, just use command:<\/p>\n<pre>sudo snap unset system experimental.hidden-snap-folder<\/pre>\n<p>Again, you need to re-install the Snap apps to make it work, and leftover data need to be manually migrated back.<\/p>","protected":false},"excerpt":{"rendered":"<p>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&#8217;s home directory to store app data, caches, and configuration files. If you don&#8217;t want to see that folder, you may hide it or move to another location. And, here&#8217;s how to do the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":48273,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1494],"class_list":["post-48272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-snap"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/48272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=48272"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/48272\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/48273"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=48272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=48272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=48272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}