Announcement

Collapse
No announcement yet.

Snapd can the cache folder and older files be removed?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Snapd can the cache folder and older files be removed?

    1) Is it safe to remove the folder /var/lib/snapd/cache/ ?

    2) Btw, when a snap app creates multiple files, in example i have for Odio radio player:
    /var/lib/snapd/snaps/odio_4.snap
    /var/lib/snapd/snaps/odio_5.snap

    is it safe to remove the older file? The file odio_4.snap has a modified date older than odio_5.snap.

    The other day I found out that when a snap is uninstalled, it is still stored at the cache folder...
    What a mess, it's something like taking the trash out of the trashcan and putting it somewhere hidden in the basement, instead of taking out the trash. I know snap apps are a very recent project but I really hope that these things get improvement in a near future.

    #2
    I don't know that apt autoremove, apt autoclean, or apt clean touches that area. Other than that, I generally stay away from snaps, and currently have nothing in that directory - although it does exist.
    The next brick house on the left
    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-28-generic


    Comment


      #3
      Originally posted by pemartins View Post
      The other day I found out that when a snap is uninstalled, it is still stored at the cache folder...
      What a mess, it's something like taking the trash out of the trashcan and putting it somewhere hidden in the basement, instead of taking out the trash. I know snap apps are a very recent project but I really hope that these things get improvement in a near future.
      Totally agree. I've been avoiding snaps generally because of these sort of things. "Taking out the trash" should be of paramount importance for things like this. If you're using BTRFS, take a snapshot then delete the garbage and see what happens. If you're not, try renaming the questionable items and see if there is any ill effect from it. If not, delete away.

      Please Read Me

      Comment


        #4
        So I did a fresh backup of my system and went for it, deleted everything inside the "/var/lib/snapd/cache" folder; also deleted the mentioned "odio_4.snap", which most probably belonged to a previous app installation. And restarted the system.

        The results were that everything work just as before. All good.
        Only had to change the path of the icon in the odio desktop file from 4 to 5. So the answer to 1) and 2) in the first post is yes, it is safe to delete.

        It's kinda hard to try to understand why the hell these useless files are being kept/left behind in people's operating systems. I have only a couple of snap apps installed and got back more than half a gb of disk space just by cleaning the cache.
        My BeachBit just got another line in the custom cleaning list, I just added "/var/lib/snapd/cache" to it.
        Last edited by pemartins; Jan 24, 2019, 10:41 AM.

        Comment

        Working...
        X