0

I have an odd issue here, so I deleted most of my npm packages on my C drive since I am moving them all to my external hard drive. I decided to do this because I realize whenever I would install a package globally it would always install it on my C drive even though I changed the prefix.

Anyways after setting up my prefix and deleting all the files that were npm related on my C drive I still have over a 100 gig of data that should be available.

Why is there so much data that got took by npm? My programs alone only was about a few gigs.

So I'm very confused as to why. I have Windows 8.

EDIT

C:\Users\Niloy>npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and 
data extracted from the cache is guaranteed to be valid. If you want to make 
sure everything is consistent,
use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this 
command with --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     H:\node.js\npm-cache\_logs\2017-11-09T19_16_27_483Z-debug.log

also using

npm cache verify
C:\Users\Niloy>npm cache verify
Cache verified and compressed (H:\node.js\npm-cache\_cacache):
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.516s
halfer
  • 19,824
  • 17
  • 99
  • 186
Near
  • 41
  • 4
  • Does a utility like [TreeSize](https://www.jam-software.com/treesize_personal/) help? – Piers C Nov 09 '17 at 19:39
  • I did not, but I managed to find my largest files by putting some codes for window on their file explorer, turns out it wasn't an npm issue at all I assumed it to be since I was using it the day before but it was the windows 8.1 installation (recently rebooted my lap top.) Thank you so much for that info there. – Near Nov 09 '17 at 20:25

1 Answers1

0

Use npm cache clean to clear %AppData%\npm. Move your cache location to the external drive with npm config set cache D:\Devel\nodejs\npm-cache --global as explained in this other answer.

Piers C
  • 2,880
  • 1
  • 23
  • 29
  • I actually created a new cache location and moved to to my external hard drive and deleted the one on my computer a while ago. I didn't use npm cache clean before though, but when I do, I got an error, I'll post the error on my question so everyone can get a better view. – Near Nov 09 '17 at 19:18