Clearing Spotify cache to recover disk space?

Found on Lifehacker:

When you play a song on Spotify, it uses some of your hard drive space to cache that file for faster playing later. Here's how to clear that cache if you need some extra disk space.

By default, Spotify limits its cache to 10% of your free space, which means the default setting should be okay—but if you've changed it, you could run into disk space problems. All you need to do is delete the files in the following folder (for your platform):

Windows: C:\Users\USERNAME\AppData\Local\Spotify\Storage

OS X: /Users/USERNAME/Library/Caches/com.spotify.client/Storage/

Linux: ~/.cache/spotify/Storage/


You can adjust the maximum size of the cache so it doesn't grow so big, and the next time you start spotify it will shrink the cache down to the size you specify.

Close spotify, then open for editing the prefs file which is at:

Windows1: %APPDATA%\Roaming\Spotify\prefs

Linux: $HOME/.config/spotify/prefs

Add or modify the line starting with storage.size to the number of megabytes you want the cache to use. For example:

storage.size=512

To limit the cache to 512 MB.

Restart spotify and the new limit will take effect (you'll see the folder shrink down to the specified size if it is already above it).


1 On Windows, the %APPDATA% folder is usually something like C:\Users\<username>\AppData.