Spotify Snap..shot

Since Spotify kept crashing, I had to remove it. But when I did snap remove spotify, I noticed that gzip started eating way lot of CPU for a good chunk of time.

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU   %MEM     TIME+   COMMAND
 2415 rishi     20   0    4632   1500   1224 R  100.0   0.0   4:03.54   gzip

I feel like Spotify messed up with their desktop app for Linux and they donā€™t intend on fixing it anytime sooner or later. I had already moved from deb package to snap package for similar reasons, but nothing changed.

Anyway, Iā€™m not aware of how snap works. I have used it twice in my life. Personally, I feel that package management through apt is good and solid. Snap packages are nothing but bulk for obvious reasons. The centralization of the source hasnā€™t solved any problem. God bless canonical.

Now, during snap remove spotify, I saw the message -

Save data of snap ā€œspotifyā€ in automatic snapshot

Googling further helped me understand that snap takes a snapshot which is -

a copy of the user, system and configuration data stored by snapd for one or more snaps on your system.

Snapshots are generated manually with the snap save command and automatically when a snap is removed (requires snapd 2.39+). A snapshot can be used to backup the state of your snaps, revert snaps to a previous state and restore a fresh snapd installation to a previously saved state.

It took around 6 minutes for snap to uninstall Spotify. Fans were going crazy, but they rested when the deed was done.

Why it did take so long?

Well, the backed-up data was massive

$ snap saved
Set  Snap     Age    Version               Rev  Size    Notes
7    spotify  1d01h  1.1.72.439.gc253025e  56   4.22GB  auto

Initially, I thought that the app size must have been unbelievably massive (which is somewhat true) -

$ snap info spotify
channels:
  latest/stable:    1.1.72.439.gc253025e 2021-11-12 (56) 175MB -

Andā€¦

Hereā€™s a couple of things -

So, did snap create the backup of cache, as well? It probably did. I regularly (and automatically) delete my Spotify cache, so thatā€™s one of the reasons the snapshot size was 4.22GB. Otherwise, it might have taken an eternity to uninstall it.

Now, I donā€™t understand the point of keeping the snapshot of cached data or any data since snap is not going to get rid of that specific directory. After the uninstallation, we end up with the backup of whatā€™s already there, in a hope that within 30 days or whatever the expiration time is, the user will accidentally delete their file and snap will become the lord and saviour by presenting all the old data. This seems an absurd approach. Why would I keep the copy of data if Iā€™m removing the app from the system, that too, for 30 days? The original data already exists, doesnā€™t it?

A snapshot can be used to backup the state of your snaps, revert snaps to a previous state and restore a fresh snapd installation to a previously saved state.

I might be missing some ā€œbigger pictureā€, but this feature is pointless to me.

Why am I being rude to a tool? I donā€™t know. Snap has pissed me off.

Anyway, I yet have to see how the files are stored in snapshots. Iā€™m guessing itā€™s rather done differently, but anyway, Iā€™m not going to check it.

I might be coming pretty ignorant regarding something I donā€™t know much about, but when I started using linux, I never had any issue with apt. Things were nice and smooth back then. Ubuntu is changing. Gnome is changing. Everythingā€™s changing. Iā€™ll switch to different operating system soon.