Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我注意到,当我安装包时,即使是全局安装,它们及其依赖项也会被放入~/.npm并且即使在卸载不再需要依赖项的包之后也不会被删除。为什么是这样?该文件夹的用途是什么~/.npm,如何清理它?
~/.npm
这是一个缓存。 它使安装东西更快。
如果你想清空它运行:
npm cache clean