A Bash script to completely remove Tailscale from an Ubuntu system and optionally reinstall it.
- GitHub Username: https://github.com/Lalatenduswain/
- Repository Name: remove-tailscale
- Website: https://blog.lalatendu.info/
- sudo Permissions: The script must be run with root privileges (
sudo). - Required Packages:
curl: Used for downloading the Tailscale installation script during reinstallation (installed automatically if missing).
- Operating System: Designed for Ubuntu systems. May not work on other Linux distributions without modifications.
- Internet Connection: Required for reinstalling Tailscale if chosen.
No additional user changes are needed beyond having sudo access.
- Download the script:
wget https://raw.githubusercontent.com/Lalatenduswain/remove-tailscale/refs/heads/master/remove-tailscale.sh
- Make it executable:
chmod +x remove-tailscale.sh
- Run the script with sudo:
sudo ./remove-tailscale.sh
This script:
- Checks for sudo privileges.
- Prompts for confirmation before removing Tailscale.
- Stops and disables the Tailscale service.
- Removes Tailscale packages, repositories, and configuration files.
- Offers an option to reinstall Tailscale using the official Tailscale installation script.
- Provides feedback throughout the process.
No additional testing or setup is required beyond the installation steps. The script does not require cron scheduling as it’s designed for one-time use.
- Run the script:
sudo ./remove-tailscale.sh
- Follow the prompts:
- Confirm removal with
y(yes) orN(no). - Choose whether to reinstall Tailscale with
y(yes) orN(no).
- Confirm removal with
- If reinstalled, start Tailscale with:
sudo tailscale up
Note: If you encounter locale-related warnings, you can fix them with:
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8If you find this script useful and want to show your appreciation, you can donate via Buy Me a Coffee. Every little bit helps!
Encountering issues? Don’t hesitate to submit an issue on our GitHub page:
https://github.com/Lalatenduswain/remove-tailscale/issues
If you like this script or content, please give it a star on GitHub!
Author: Lalatendu Swain | GitHub | Website
This script is provided "as-is" and may need modifications or updates to suit your specific environment and requirements. Use it at your own discretion. The author disclaims any responsibility for damages or issues resulting from its use.