Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LinauxTerminology/0cb653539d8ca31ba97ad84ccc7063a1 to your computer and use it in GitHub Desktop.
Save LinauxTerminology/0cb653539d8ca31ba97ad84ccc7063a1 to your computer and use it in GitHub Desktop.
Node.js Install Ubuntu Linux
#!/bin/sh
# For version 12
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install gcc g++ make
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
##uninstall nodejs
sudo apt-get remove nodejs
sudo apt-get remove npm
Then go to sudo nano /etc/apt/sources.list.d and remove any node list if you have. Then do a
sudo apt-get update
##remove yarn
sudo apt-get remove yarn && sudo apt-get purge yarn
##remove mongodb
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment