Free Disk Space

By Tim Hopper — tdhopper.com

Tools for cleaning up your system and freeing up space, especially for developers.

Use at your own risk.

Command Line

Docker

docker system prune --all

Conda

conda clean --all

Git

Cleanup unnecessary files and optimize the local repository

git gc --aggressive --prune=now

Deleted merged branches (except for master, main, develop or dev)

git branch --merged | egrep -v "(^\*|master|main|develop|dev)" | xargs git branch -d

Homebrew

brew cleanup -s

apt-get / aptitude

apt-get clean
# or
apt clean
# or
aptitude clean

Mac/Linux Cache Folder

rm -r ~/.cache

Yarn

yarn cache clean

Utilities

Use at your own risk.

(Pull request’s welcome)