WARNING: All processes are irreversible!
Node.js
Delete all unused global node modules and Node.js executables installed withnvm
Runningnvm ls
will show you all versions installed, you can usenvm uninstall v12.2.0
for example to uninstall a specific version, however this doesn't remove global npm packages that you installed for this version. It's better to go to~/.nvm/versions/node
folder andrm -rf
versions that you don't need.
A useful command to delete all versions that you aren't currently using:
cd ~/.nvm/versions/node;ls-A |grep-v`nvm current` | xargsrm-rf
Delete all node_modules folders from your projects
Commands taken fromthis article
Check size of node_modules in folder with your projects
# Mac / Linuxcddocuments find.-name"node_modules"-type d-prune | xargsdu-chs# Windowscddocuments FOR /d /r. %din(node_modules) DO @IF EXIST"%d"echo %d"# --- Example output ---255M ./someProject/node_modules482M ./anotherOne/node_modules 707M total
Delete all node_modules folders
# Mac / Linuxfind.-name"node_modules"-type d-prune-execrm-rf'{}' +# WindowsFOR /d /r. %din(node_modules) DO @IF EXIST"%d"rm-rf"%d"
Yarn and npm cache
yarn cache cleannpm cache clean--force
Xcode
Really nice tool for deleting old simulators, archives and other Xcode junk:https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12
Homebrew
Homebrewperiodacaly performs cleanup but if you need some extra space now, you can run:
brew cleanup
Docker
Docker needs to be running for this to work.
Be aware that docker removes all images that currently aren't used, so if you want to keep something, start it and it won't be deleted. Checkdocs for more info.
docker system prune-a# add '--volumes' to delete all volumes as well
If you have some lang/tool/ide that requires cleanup leave a comment and I will add it.
Top comments(0)
Some comments may only be visible to logged-in visitors.Sign in to view all comments.
For further actions, you may consider blocking this person and/orreporting abuse