Fix: npm vs code eacces permission denied unlink /usr/local/bin/code


Error:
npm ERR! path /usr/local/bin/code
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/bin/code'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/bin/code'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/bin/code' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/c2cdev/.npm/_logs/2023-08-30T11_12_13_139Z-debug.log

You might get the above error in the Terminal when you try to uninstall VS Code using npm command.

Fix: As you can see in the error logs, it says please try again with root/Administrator, so try to run the same command with sudo.

sudo npm uninstall -g code
Fix - npm vscode eacces permission denied unlink

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap