Skip to main content

Uninstall Teleport

This guide explains how to uninstall Teleport binaries completely.

Prerequisites

  • A system with Teleport installed.
warning

These instructions only apply to non-containerized installations of Teleport.

If you are running Teleport in Kubernetes, you should uninstall the Helm chart release instead:

# Example: uninstall the Helm release named 'teleport-kube-agent' in the 'teleport' namespace
$ helm uninstall --namespace teleport teleport-kube-agent

If you are running Teleport in Docker, you should stop the Teleport Docker container:

# Example: Stop the Docker container named 'teleport'
$ docker stop teleport

Step 1/3. Stop any running Teleport processes

Instruct systemd to stop the Teleport process, and disable it from automatically starting:

$ sudo systemctl stop teleport
$ sudo systemctl disable teleport

If these systemd commands do not work, you can "kill" all the running Teleport processes instead:

$ sudo killall teleport

Step 2/3. Remove Teleport binaries

Uninstall the Teleport binary using APT:

$ sudo apt-get -y remove teleport

Uninstall the Teleport APT repo:

$ sudo rm -f /etc/apt/sources.list.d/teleport.list
Uninstall standalone DEB package

If the commands above do not work, you may have installed Teleport using a standalone DEB package. Remove it with:

$ sudo dpkg -r teleport

Step 3/3. Remove Teleport data and configuration files

note

These are the default paths to the Teleport config files and data directory. If you have changed these from the defaults on your system, substitute those paths here.

Remove the Teleport config file:

$ sudo rm -f /etc/teleport.yaml
# Optional: Also remove the Machine ID config file, if you used it
# $ sudo rm -f /etc/tbot.yaml

Remove the Teleport data directory:

$ sudo rm -rf /var/lib/teleport

Optionally, also remove the global config file and local user data directory for tsh:

$ sudo rm -f /etc/tsh.yaml
$ rm -rf ~/.tsh

Teleport is now removed from your system.

Any Teleport services will stop appearing in your Teleport Web UI or the output of tsh ls once their last heartbeat has timed out. This usually occurs within 10-15 minutes of stopping the Teleport process.