Ways to save disk space with Ionic/Angular App?

My old Macbook is really starting to chew through disk space with some of my Ionic projects. A few of my smaller projects are going over 1GB in file size. Is there a way to optimize the code and disk spaced used within each project?

Most of my projects are Cordova based, but a few are Capacitor. Not sure if one is more economical than the other.

You can use npkill to delete node_modules folder from projects that you are not using at the moment, but you’ll have to eventually run npm install when you need to build again and everything will be downloaded.

npx npkill will scan your folder and list all subprojects and let you remove node_modules by pressing the space bar.

You can also delete a few iOS versions from ~/Library/Developer/Xcode/iOS DeviceSupport/ folder, specially if you have some with 8 digit id, that means it’s a beta

1 Like