Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is safe to delete .cache folder in node_modules?

My project size reached 1.2GB, and it was caused by the .cache folder inside the npm module. Is it safe if I delete that folder?

enter image description here

like image 777
Juliar Nasution Avatar asked Mar 28 '26 15:03

Juliar Nasution


2 Answers

generally, it is safe to delete the node_modules folder, as it can be regenerated by the package manager.
Package versions may change during reinstall (unless you have a *.lock file)

like image 51
Uri Kutner Avatar answered Apr 01 '26 06:04

Uri Kutner


if it is safe to delete it, and you can recreate it when you compile or when you generate the build

like image 40
dany952 Avatar answered Apr 01 '26 07:04

dany952



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!