Answer the question
In order to leave comments, you need to log in
How to remove unused npm packages?
I recently started learning Grunt.
And here's the crux of the matter:
Let's say I install package npm install SomePack --save-dev
A, a bunch of other plugins are installed in place with it.
A little later I removed SomePack: npm uninstall SomePack
Are all dependency plugins removed too? Or stay?
And how can I "clean" from unused plugins?
For example, I only use SomePack1
and SomePack2
. Accordingly, I only need them and their dependencies. How to remove everything else?
Maybe there is some command "Delete everything" or "Delete everything except ..."?
Answer the question
In order to leave comments, you need to log in
See how the directories are organized all in node_modules
All SomePack1 dependencies are in its directory
Dependencies are not rummaged
Remove unused packages from the cache
$ sudo apt-get autoclean
Cleaning the cache in Ubuntu, apt utilities:
$ sudo apt-get clean
Remove unnecessary dependencies:
$ sudo apt-get autoremove
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question