Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save UbuntuEvangelist/ec4fbc4199eae232963bb42f10041d13 to your computer and use it in GitHub Desktop.
Save UbuntuEvangelist/ec4fbc4199eae232963bb42f10041d13 to your computer and use it in GitHub Desktop.
Completely Reinstall Node JS & NPM
sudo -i
apt remove --purge nodejs npm
apt clean
apt autoclean
apt install -f
apt autoremove
apt install curl
apt install python3 g++ make python3-pip
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
apt install -y nodejs
apt install gcc g++ make
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update && apt install yarn
node -v && npm -v
#node.js #node #npm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment