Skip to content

Instantly share code, notes, and snippets.

@pnhoang
Last active December 6, 2023 15:21
Show Gist options
  • Save pnhoang/eb3df3f4f563e6e6d9b8776f2b6b8a7b to your computer and use it in GitHub Desktop.
Save pnhoang/eb3df3f4f563e6e6d9b8776f2b6b8a7b to your computer and use it in GitHub Desktop.
Clean up Macbook
# The following scripts can be run from within your `~/dev` or `~/develop` or whatever folder you have for storing your source code as a developer.
# Since, node_modules, .next or cdk.out are folders that can be re-created by running their respective install commands.
# Using these 3 commands, I saved around 15GB of disk space.
```
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name ".next" -type d -prune -exec rm -rf '{}' +
find . -name "cdk.out" -type d -prune -exec rm -rf '{}' +
```
# also more generic one here:
# https://github.com/paulaime/CleanUpMac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment