Uninstall Terraform Enterprise
If you installed Terraform Enterprise on VMware instances, you may not be able to easily request new virtual machines for a broken or corrupted installation. Instead, you can use the uninstall
script to remove Terraform Enterprise and all of its services (excluding Docker) from a system. This includes the default Replicated snapshot directory - /var/lib/replicated/snapshots
. If you have Replicated snapshots you wish to keep, please back up this directory before running the uninstall script.
Important: This script does not touch the mounted disk path, so you will need to manually clean that up if necessary.
Please contact support with questions or issues.
While the Script Runs
After you initiate uninstall
:
Enter
yes
when asked if you want to continue with the installation.If there are snapshots present on the system, choose whether to move them to another directory, delete them, or cancel the uninstall. Here is an example of moving snapshots to another directory:
The script continues and stops the Replicated services, removes the Docker containers, and removes Replicated executables and configuration files from the system.
Choose an option to prune Docker volumes:
Select
Prune all Docker volumes
if you only use this system for Terraform Enterprise.Select
Prune only application Docker volumes
to prune only Replicated and Hashicorp Docker volumes and leave the rest intact.Select
Skip this step
to leave all Docker volumes intact.
The script removes dangling Docker volumes and the Docker networks that were created for the application. You may see errors such as the ones below, these are normal and just mean the script is attempting to clean up something that's already been removed.
Run the Uninstaller
Online
If the system can reach install.terraform.io, go to a shell on your instance and run one of the following:
Download the uninstaller: Run
curl https://install.terraform.io/tfe/uninstall > uninstall.sh
.Make the script executable: Run
chmod +x uninstall.sh
.Execute the uninstaller: Run
sudo bash uninstall.sh
to execute the script.
Airgapped
If the system cannot reach install.terraform.io:
Download the uninstall script from a machine that has access to install.terraform.io, and upload the script to the Terraform Enterprise server.
From a shell on your instance, run
sudo bash uninstall.sh
.