Skip to content

Instantly share code, notes, and snippets.

@huynhducduy
Created September 15, 2025 19:59
Show Gist options
  • Save huynhducduy/da1e8e2c92c7cc743b04d55d30e37c34 to your computer and use it in GitHub Desktop.
Save huynhducduy/da1e8e2c92c7cc743b04d55d30e37c34 to your computer and use it in GitHub Desktop.
Clean all cache
```
brew cleanup --prune=all
rm -rf "$(brew --cache)"
sudo npm cache clean --force
rm -rf $(npm get cache)/_npx/*
pnpm store prune
pnpm cache delete
yarn cache clean --all
bun pm cache rm -g
deno clean
rm -rf /var/log/*
rm -rf ~/.cache/nodejs-compile-cache
rm -rf ~/Library/Caches/*
rm -rf ~/Library/"Group Containers"/group.com.apple.UserNotifications/Library/UserNotifications/Remote/default/*
rm -rf ~/Library/Metadata/CoreSpotlight/*
rm -rf /Library/Java/JavaVirtualMachines/*
rm -rf ~/.gradle/caches/*
rm -rf ~/.android/cache/*
cargo cache -a # via cargo-cache crate
go clean -cache -testcache -modcache -fuzzcache
pod cache clean --all
docker stop `docker ps -qa`
docker rm `docker ps -qa`
docker rmi -f `docker images -qa`
docker volume rm $(docker volume ls -q)
docker network rm `docker network ls -q --filter type=custom`
docker system prune --all
docker builder prune
```
Clean `Android Studio` -> `Tools` -> `SDK Manager`: Bật `Show Package Details` và uncheck version cũ, `Apply` và `Optimize disk space` cho chắc
`Telegram`, `Jetbrains ToolBox` manually bằng UI
Dùng `Dev Cleaner`, `CleanMyMac`, `Pearcleanner` app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment