4

On my Mac, I have noticed that Spotify uses quite a large cache (/Library/Caches/com.spotify.client). In my case, it is roughly 4GB.

However, that's really puzzling because while it's true that I download all my songs, I barely own like 25 songs. The folder contains a LOT of seemingly encrypted files of 10MB or so (definitely more than 25 files!).

So my question is: why is this cache so large? Is this behavior expected from such a small library of mine?

I imagine that deleting it just clears my downloaded soundtracks - which I don't really intend to do, but I am baffled that the massive size of the cache.

6

It seems there is two types of cache with Spotify. The first type (not the one your describing) is used for the tracks you have downloaded. It’s as simple as that. :)

The second type is downloaded songs onto your computer from streaming the music online. Even though you never told Spotify to download these song, it saves them anyway as your streaming them so that if you ever play that song in the future, it will play them from the cache. This reduces the stress on their servers, meaning they don't have to have as big as a infrastructure, and they make more profit. They encrypt it because they don't want you walking off with the songs.

The link here is where I can validate this information. Go ahead and delete it.

At the end of the day, Spotify client is closed source code, so we cannot change what it does. What we can do however is set a cron job to delete the directory daily, so that it would never grow very large.

Add this line to crontab and it will delete the file daily at 12.

0 12 * * * rm "Library/Caches/com.spotify.client" >/dev/null 2>&1
  • Does that mean that the cache will just keep on growing indefinitely? Can it be stopped? (I'd prefer not to clear it every couple weeks) – JVon Jan 12 '18 at 21:36
  • As long as you keep listening to new songs not cached, it will keep growing. Im unsure if you are aware, but spotify also uses a P2P networking as another attempt to reduce server load, meaning the songs on your computer get served out to other spotify users. – TrevorKS Jan 12 '18 at 21:48
  • 1
    At the end of the day, spotify client is closed source code, so we cannot change what it does. What we can do however is set a cron job to delete the directory daily, so that it would never grow very large. – TrevorKS Jan 12 '18 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.