Slack, Discord and Teams cache on Mac: safe to delete?
Quit first: Slack · Discord · Microsoft Teams
Where it is
~/Library/Application Support/Slack/Cache~/Library/Application Support/Slack/Service Worker/CacheStorage~/Library/Application Support/discord/Cache~/Library/Application Support/discord/Code Cache~/Library/Containers/com.microsoft.teams2/Data/Library/Caches
What it is
Slack and Discord are Electron apps, and the new Microsoft Teams is also built on web technology, so all three keep browser-style caches: images, avatars, file previews, scripts and service worker storage. They live in each app's Application Support folder or sandbox container.
Why it gets so big
Every image, GIF, video preview and shared file you scroll past can be cached, and busy workspaces and servers make these folders grow quickly.
Is it safe to delete?
Yes. Messages, files and settings are stored on each service's servers, so nothing is lost; the apps re-download what they need as you scroll, which can feel slower at first. Sign-in data isn't kept in these cache folders. Quit Slack, Discord and Teams first.
Tip
Slack also has a Clear Cache and Restart option under Help > Troubleshooting that does the same for Slack from inside the app.
See how much space it uses
du -sh "$HOME/Library/Application Support/Slack/Cache" "$HOME/Library/Application Support/Slack/Service Worker/CacheStorage" "$HOME/Library/Application Support/discord/Cache" "$HOME/Library/Application Support/discord/Code Cache" "$HOME/Library/Containers/com.microsoft.teams2/Data/Library/Caches" 2>/dev/nullDelete it by hand
Run in Terminal. Deleting cannot be undone, so check the paths first.
rm -rf "$HOME/Library/Application Support/Slack/Cache"/*
rm -rf "$HOME/Library/Application Support/Slack/Service Worker/CacheStorage"/*
rm -rf "$HOME/Library/Application Support/discord/Cache"/*
rm -rf "$HOME/Library/Application Support/discord/Code Cache"/*
rm -rf "$HOME/Library/Containers/com.microsoft.teams2/Data/Library/Caches"/*