Skip to content

Instantly share code, notes, and snippets.

@alexishida
Last active October 21, 2025 23:27
Show Gist options
  • Select an option

  • Save alexishida/999d74bc6bd035b343eaa12daadd71f1 to your computer and use it in GitHub Desktop.

Select an option

Save alexishida/999d74bc6bd035b343eaa12daadd71f1 to your computer and use it in GitHub Desktop.
uninstall rbenv
#!/bin/bash
SCRIPT_USER=$SUDO_USER
# Checking if script running with sudo
if [[ $(id -u) -ne 0 ]]
then echo "Please run with sudo ..."
exit 1
fi
rm -fr /usr/local/rbenv
rm -fr /root/.rbenv
rm -fr /home/"$SCRIPT_USER"/.rbenv
rm -fr /root/.npm
rm -fr /home/"$SCRIPT_USER"/.npm
rm -fr /root/.nvm
rm -fr /home/"$SCRIPT_USER"/.nvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment