- Support Center
- Multiple Languages
- Language
- Help Us Translate
Expert in
PC Health Solution
All-in-one PC health solution: clean, optimize and secure

Comprehensive PC cleaning, optimization and protection
Keep drivers always up-to-date

More stable performance with less system crashes
Protect millions of computers against malware
Top computer security with full-round protection
Protect against viruses & boost PC performance
Easily removing unwanted programs & leftovers
Automatically keep your software up-to-date
Quickly check system information and PC specs
Never worry about data theft or privacy leaks
Maximize hard drive optimization for faster PC
Enjoy a Faster and More Secure Mac
Need to uninstall NPM package safely? Learn how to uninstall NPM package locally and globally, fix NPM uninstall not working issues step by step.
Understand That NPM Packages Can be Local or Global
How to Uninstall Local NPM Package in Project Folder
How to Uninstall NPM Global Package
Troubleshoot NPM Uninstall Not Working Issues
Before You Uninstall an NPM Package Windows What You Should Do
Use Clean up Software to Scan for Residual Files
If you need to uninstall NPM package dependencies from a project or remove a CLI tool from your system, the process is usually simple - but it can get confusing when local and global installs are mixed up. Follow this guide to learn how to remove local and global packages step by step.
Before removing anything, you need to distinguish NPM packages. Knowing this difference is the key to avoiding uninstall mistakes.
There are two main types of NPM installations:
Local packages: Installed inside a specific project folder.
Global packages: Installed system-wide for command-line use.
When you uninstall NPM package, the exact command depends on how the package was originally installed. If you remove a local package, NPM typically updates your project files automatically. If it’s global, you’ll need to use the global flag.
Step 1. Open your terminal
For Windows: Press Win + R, type cmd and press Enter.
For macOS: Press Command + Space, type Terminal, and open it.
For Linux: Press Ctrl + Alt + T (on most distributions).
Step 2. Navigate to your project folder
Use the cd (change directory) command to go to the folder that contains your package.json file. For example:
bash
cd C:\my-project
If you're unsure where you are, type pwd (macOS/Linux) or cd with no arguments (Windows) to see the current path.
Step 3. Run the uninstall command
Inside the same terminal window, type:
bash
npm uninstall package-name
For example:
bash
npm uninstall lodash
Then press Enter.
NPM will delete the lodash folder from node modules folder. It will also automatically remove lodash from package.json and package-lock.json.
If the package was installed globally, use the -g flag:
bash
npm uninstall -g package-name
Example:
bash
npm uninstall -g typescript
You can run this from any directory – you don’t need to be inside a project folder.
Typo in package name – Check the exact spelling in package.json dependencies.
Package is a dependency of another package – NPM protects transitive dependencies. Use NPM uninstall --depth=0 or manually remove the parent package first.
Lock file corruption – Delete node_modules and package-lock.json, then run NPM install to rebuild a clean state.
NPM cache issues – Run NPM cache clean --force and retry the uninstall.
If all else fails, manually delete the package folder from node_modules and remove its entry from package.json and package-lock.json. Then run NPM install to resync everything.
To avoid dependency issues, keep these quick tips in mind:
Confirm whether the package is local or global
Make sure you’re in the correct project directory
Check if other packages still depend on it
Review package.json after removal
Reinstall dependencies if your project starts failing afterward
These small checks can save you time, especially in shared or older projects.
While uninstall NPM packages commands work perfectly for Node.js packages, you might occasionally run into stubborn Windows applications that refuse to uninstall cleanly — leaving behind leftover files, empty folders, or registry entries. That’s where a dedicated tool like IObit Uninstaller can be a helpful companion.
It forcefully removes programs, scans for leftovers, and even batch uninstalls multiple apps at once. So if you ever switch from managing JavaScript dependencies to cleaning up your system in general, give IObit Uninstaller a try. For NPM packages though, stick with the trusty command line — but it’s good to have options.
If you uninstall Steam, what happens to your games and saves? Learn whether your games are deleted, where files are stored, and how to keep your progress safe.
Yes. You can uninstall and reinstall Realtek audio driver to solve the problem that PC sound is not working generally. Try the 3 ways to fix now.
Can’t uninstall Adobe Creative Cloud, why? Can I force uninstall it? Get the answer here and find solutions.
Subscribe to keep you updated on products updates and special offers via email. And you can opt-out at any time.
© 2005 - IObit. All Rights Reserved |Refund Policy |EULA |Legal Notice |Privacy Policy
IObit uses cookies to improve content and ensure you get the best experience on our website.
Continue to browse our website agreeing to our privacy policy.