0

I have followed the below instructions to install nodejs

Installing a tar.gz on Linux


Download the .tar.xz file form https://nodejs.org/en/ and then press Ctrl + Alt + T.

Then go to the destination that you downloaded your file to. For me it's my downloads folder. Then hit this command and Node.js will get installed on your system:

sudo tar -xf node-v16.0.0-linux-x64.tar.xz --directory=/usr/local --strip-components=1


Now, i want to remove node js, so i tried

rahul@rahul:~$ sudo apt-get purge --auto-remove nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'nodejs' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rahul@rahul:~$ sudo apt-get purge --auto-remove node
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package node

rahul@rahul:~$ node -v
v14.17.6

rahul@rahul:~$ 

How can i remove?

  • tar has extracted files to /usr/local dir. You would have to remove manually from that location. apt would not work in this case! – sharmag Sep 18 '21 at 04:59
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 25 '21 at 12:34
  • I remove completly with this solution [https://stackoverflow.com/a/60701804/15725189](https://stackoverflow.com/a/60701804/15725189) – Andrés Sapatanga Mar 15 '23 at 16:04

0 Answers0