How I recovered 30+G from my Mac
01 May, 2021
Introduction
This guide is for web & mobile developers who are facing disk space issues using Mac.
Steps
- Use either npm or yarn. Both of them cache stuff and using both of them would bloat the system.
-
If you are using IntelliJ products, they cache a lot of stuff for easier access. You need to periodically delete the cache.
File > Invalidate cache
- Use products like “Clean my Mac” to free up space.
-
While cleaning the cache directory under
~/Library/Caches/
you need to delete the files while keeping the folder structure. Use the following commandfind ./ -type f -exec rm {} +
-
Remove yarn/npm cache. Remove the cache which you do not use primarily. I will stop using yarn
yarn cache clean
-
Remove cocoa pods cache
pod cache clean --all
-
Remove xcode derived data. I freed up about 6G from this.
rm -rf ~/Library/Developer/Xcode/DerivedData
-
Remove intellij cache
rm -rf /Users/bisvarup.m/Library/Caches/JetBrains
I have also started to use open-source software called iGlance to track my system metrics. I am able to view the following metrics with this.
- Disk space usage
- System temperature
- Network stats
- Disk RPM
#mac