How To Uninstall Node Js In Ubuntu

Node.js is a powerful tool for building server-side applications, but sometimes you may need to uninstall it from your Ubuntu system.

Whether you’re moving to a different version or simply want to clean up your system, this tutorial will guide you through the steps to uninstall Node.js on Ubuntu.


1. Open the terminal window on your Ubuntu system.

2. Enter the following command to remove any Node.js package installed on your system:

3. Remove all npm packages installed on your system using the following command:

4. If you used NodeSource to install Node.js, run the following command to remove it:

5. Remove all node_modules directories using the following command:

6. Finally, remove the Node.js PPA repository using the following command:


By following these simple steps, you can easily uninstall Node.js from your Ubuntu system. Remember to double-check that all packages and directories related to Node.js have been removed before continuing with other tasks.

If you ever need to reinstall Node.js on your Ubuntu system, simply follow the official documentation provided by Node.js or use one of the many online tutorials available on the web.