Uninstalling discourse instance

AI-generated summary

In a discussion titled “Uninstalling discourse instance” under the Installation category, users seek guidance on cleanly uninstalling a Discourse instance via command line to prepare for a fresh reinstall. Earlie initiates the thread asking for documentation. fzngagan responds with step-by-step instructions: SSH into the server, navigate to /var/discourse, run ./launcher stop app and ./launcher destroy app, then delete the /var/discourse folder. VinodSingh suggests adding an “Uninstall” section to official guides. pfaffman notes that since Discourse is typically installed on a dedicated VM, most users simply destroy the VM to uninstall. merefield humorously compares uninstalling to outdated practices, referencing VMware ESXi. ThrashAbaddon reports that running ./launcher stop app triggers a base image download, which seems unnecessary during uninstallation, and also warns of low disk space. They later share their manual workaround: deleting the /var/discourse folder and manually stopping/removing the Docker container. pfaffman confirms that ./launcher auto-updates images and containers, and acknowledges that direct Docker commands (docker stop app; docker rm app) are valid alternatives for experienced users. The thread reflects community interest in clearer uninstallation documentation and highlights the tension between automated tooling and manual control.

Helllo,

Is there comprehensive documentation available on how to uninstall discourse instance via command line?
This is required to do a clean install once again.

According to the official installation guide, discourse lives inside its own docker container.
So, you simply need to stop the container and remove /var/discourse folder.

Steps.

  1. ssh into your vps server.
  2. cd /var/discourse
  3. ./launcher stop app
  4. ./launcher destroy app
  5. cd /var
  6. sudo rm -rf discourse

It would be nice to include Uninstall section in installation or some other guide.

Since the recommended way to do things is to install Discourse on a fresh installation used for nothing else, the way most people uninstall is by destroying the virtual machine.

Those instructions are by design for only the one most standard case.

Absolutely, “Uninstall” is so year 2000 :wink:

One interesting thing, if I want to stop and destroy the app it will try to download another base image. What the hell? :smile:

:/var/discourse> sudo ./launcher stop app
x86_64 arch detected.

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

2.0.20220818-0047: Pulling from discourse/base
Digest: sha256:7734701087766821ffb2ddcef423754798bd345c2ac0d550131c6e6905c268e8
Status: Downloaded newer image for discourse/base:2.0.20220818-0047
docker.io/discourse/base:2.0.20220818-0047
You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to continue
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg00-var  9.8G  4.9G  4.4G  53% /var

Would you like to attempt to recover space by cleaning docker images and containers in the system? (y/N)y
If the cleanup was successful, you may try again now

What I did was:

  1. sudo rm -rf discourse
  2. find the docker container that has discourse, kill it and then remove it.

Let me know if I need to do anything else. :slight_smile:

Yeah. ./launcher keeps itself and the Discourse base image up to date. If you’re familiar with docker then you can just docker stop app;docker rm app as you did.