Skip to content

Instantly share code, notes, and snippets.

@axe312ger
Last active March 15, 2022 11:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axe312ger/2b0c9915bee3213a3daddaf7054c0e94 to your computer and use it in GitHub Desktop.
Save axe312ger/2b0c9915bee3213a3daddaf7054c0e94 to your computer and use it in GitHub Desktop.
Keep your developer system clean

Clean up your developer workstation

Free disk space on your development workstation by cleaning some caches

OSX/Brew

brew cleanup

Alternative:

update all formulas and then remove old ones

brew update && brew upgrade && brew cleanup

Docker

docker system prune -a
docker image prune --all --filter until=240h

Node related

yarn cache clean
npm cache clean --force
nvm cache clear

Have a look at out your ~/.nvm/versions/node directory and delete all the versions you won't use anymore. This can save several gigabytes :)

Delete all node_modules older than 3 months

find . -name "node_modules" -type d -mtime +90 | xargs rm -rf

XCode

Remove old simulators

xcrun simctl delete unavailable

Clean up caches:

rm -rf ~/Library/Developer/Xcode/Archives
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~~/Library/Developer/Xcode/iOS Device Logs/

PHP

composer clear-cache

Ruby

rvm cleanup all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment