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 -
-
Spotify creates two folders (that Iām aware of). One is stored in
.config
and the other one in.cache
. -
If you listen to a lot of music, Spotify cache grows bigger and bigger. I remember deleting around 50G of data a couple of months back. The
node_modules
of the music ecosystem.
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.