CleanMate

All guides · macOS and Ubuntu · Updated

Spotify, Apple Music, Podcasts and YouTube Music downloads and cache taking up disk space — Mac and Ubuntu

How much space Spotify, Apple Music, Apple Podcasts and YouTube Music use on a Mac and on Ubuntu (deb, Snap, Flatpak), where the stream cache and the offline downloads are, how to clear them by hand without losing your library, and what CleanMate cleans.

Download for macOS · Install on Ubuntu — free and open source

CleanMate on Ubuntu asking before it cleans music app caches such as Spotify, with each item and its size

Music and podcast apps keep two kinds of files: a cache of what you streamed, so the next play is instant, and downloads you asked for, to listen offline. A cache can reach 10 GB or more on its own; downloads add to it. The cache is safe to clear. The downloads are your offline songs and episodes: deleting them means downloading them again. This guide covers where each app keeps both, on a Mac and on Ubuntu.

Contents

Spotify

Spotify caches songs while you stream and stores offline downloads in the same place. It does not tell the two apart in the folder, so the safe first step is in the app: Settings › Storage (Spotify Desktop) shows the cache size and has a Clear cache button. Songs you downloaded for offline listening may need downloading again afterwards; check Settings after clearing.

By hand on a Mac, quit Spotify, then:

du -sh ~/Library/Application\ Support/Spotify/PersistentCache/Storage
du -sh ~/Library/Caches/com.spotify.client
rm -r ~/Library/Application\ Support/Spotify/PersistentCache/Storage

PersistentCache/Storage is the stream cache and your offline downloads. Your playlists, library and account are online, and nothing there is lost. The small Library/Caches/com.spotify.client folder is an ordinary cache. To keep your offline downloads, clear nothing by hand and remove only the playlists you no longer need offline.

Apple Music

Apple Music keeps downloaded songs in your Music library: ~/Music/Music/Media.localized (or Media), alongside songs you imported yourself. Do not delete anything in the library by hand: imported songs may exist nowhere else. Remove downloads from the app instead: select a song, album or playlist, right-click › Remove Download. Sort the Songs list by Size to find the big ones.

The streaming cache is an ordinary cache:

du -sh ~/Library/Caches/com.apple.Music

With Music closed, deleting that folder is safe; Music rebuilds it. If you use iCloud Music Library, your songs stay in iCloud either way.

Apple Podcasts

Podcasts keeps downloaded episodes and its streaming cache in its group container, which Terminal can only read with Full Disk Access (how to grant it):

du -sh ~/Library/Group\ Containers/243LU875E5.groups.com.apple.podcasts/Library/Cache

Downloaded episodes are the audio files directly in that Cache folder. In the app, Library › right-click an episode › Remove Download, or turn off automatic downloads in Podcasts’ settings. Do not delete Documents/MTLibrary.sqlite next to it: that is your subscriptions and which episodes you played.

YouTube Music

There is no official YouTube Music app for Mac or Ubuntu: it is a website, or an app made from the website. Its cache is that of the browser it runs in. Offline downloads exist only in the phone apps. On the computer, clear it from the browser (Settings › Privacy › Clear browsing data › Cached images and files), or with the browser’s own cache folders: see browser data: cache, history, cookies. Clearing it does not log you out unless you also clear cookies. A desktop app from a third party is an Electron app: see Slack, Discord and other chat app caches for how those caches are found.

Spotify on Ubuntu: deb, Snap and Flatpak

The folder depends on how Spotify was installed. Quit Spotify first.

Install Stream cache and offline downloads
deb (Spotify’s own repository) ~/.cache/spotify/Storage
Snap ~/snap/spotify/current/.cache/spotify/Storage
Flatpak ~/.var/app/com.spotify.Client/cache/spotify/Storage
du -sh ~/.cache/spotify ~/snap/spotify/current/.cache/spotify ~/.var/app/com.spotify.Client/cache/spotify 2>/dev/null
rm -r ~/.cache/spotify/Storage       # deb; use the path of your install

As on a Mac, offline downloads are in Storage too: they go with the cache. Your library and playlists are online. For Snap and Flatpak caches in general see Snap and Flatpak disk space, and for the rest of ~/.cache see how to clear the cache on Ubuntu.

How CleanMate does it

You see each item with its size before anything is deleted. Download CleanMate; all features: macOS, Ubuntu. More free space: how to free up disk space on a Mac or on Ubuntu, and which ~/Library folders are safe to delete.

FAQ

Is it safe to clear the Spotify cache? Yes: your library and playlists are online. Songs you downloaded for offline use are in the same folder and must be downloaded again.

Why is Spotify using so much space? It caches every song it streams and keeps offline downloads in the same place; the Storage page in Settings shows both.

Where does Apple Music store downloaded songs? In the Music library under ~/Music/Music. Remove downloads from inside the app, not in Finder.

Will deleting the Podcasts cache lose my subscriptions? No, they are kept in the library database, which neither Podcasts’ cache nor CleanMate touches. Downloaded episodes are downloaded again when played.

How do I clear YouTube Music’s cache on a computer? Clear the browser’s cached images and files. There is no separate YouTube Music cache.

Skip the commands

CleanMate runs on both systems: pick yours.

Open source — star it on GitHub: CleanMate for macOS · CleanMate for Ubuntu

How CleanMate decides what is safe to remove →