Note

The documentation you're currently reading is for version 3.5.0. Click here to view documentation for the latest stable version.

Uninstall

We strongly believe in Automation, and advise that servers should be treated as Cattle not Pets. Therefore, our recommendation is to destroy the VM or container, rather than uninstalling StackStorm.

Unfortunately some users operate in environments where it is difficult to get a new VM on demand, or they need to re-run a failed StackStorm installation. For them, we offer this guidance on how to remove StackStorm and related applications.

Warning

  • The instructions given here will delete data.

  • If you are trying to recover from a failed installation, some of these steps may fail. Proceed with all instructions, and ignore any errors.

  • Proceed with caution if you have other applications running on this system, especially if you are re-using components such as RabbitMQ, MongoDB, Nginx or PostgreSQL. You will need to manually delete the relevant databases & configurations.

  • Removing the StackStorm packages will not automatically remove all dependencies that may have been installed. Because we don’t know exactly which applications were installed originally, we can’t know for sure which dependencies are safe to remove. These can be left on your system.

Overview

The uninstallation procedure follows this outline:

  1. Stop services.

  2. Remove packages.

  3. Remove StackStorm system user.

  4. Remove databases and other dependencies.

  5. Remove repositories.

  6. Clean up any remaining logs, configurations and directories.

The exact steps vary slightly between Linux distributions. This is highlighted in the instructions below. Only execute the instructions for your distribution.

1. Stop Services

  • Ubuntu 18.04/20.04:

    sudo st2ctl stop
    sudo service nginx stop
    sudo service mongod stop
    sudo service rabbitmq-server stop
    sudo service redis-server stop
    
  • RHEL/CentOS 7.x/8.x:

    sudo st2ctl stop
    sudo systemctl stop nginx
    sudo systemctl stop mongod
    sudo systemctl stop rabbitmq-server
    sudo systemctl stop redis
    

Note

If uninstalling a version earlier than StackStorm 3.3, add postgresql to list of services to stop if is running on your system.

2. Remove Packages

  • Ubuntu 18.04/20.04:

    If you are using StackStorm only:

    sudo apt-get purge st2 st2chatops st2web
    

    If you have Extreme Workflow Composer installed, instead use:

    sudo apt-get purge st2 st2chatops st2web bwc-ui st2flow
    
  • RHEL/CentOS 7.x/8.x:

    If you are using StackStorm only:

    sudo yum erase st2 st2chatops st2web
    

    If you have Extreme Workflow Composer installed, instead use:

    sudo yum erase st2 st2chatops st2web bwc-ui st2flow
    

Note

If uninstalling a version earlier than StackStorm 3.3, add st2mistral to list of packages to remove if it is installed on your system.

3. Remove StackStorm System User

  • Ubuntu/RHEL/CentOS:

    sudo userdel -r stanley
    sudo rm -f /etc/sudoers.d/st2
    

4. Remove Databases and Other Dependencies

  • Ubuntu:

    sudo apt-get purge mongodb-org* rabbitmq-server erlang* nginx nodejs redis-server
    
  • RHEL/CentOS:

    sudo yum erase mongodb-org* rabbitmq-server erlang* nginx nodejs redis
    

Note

If uninstalling a version earlier than StackStorm 3.3, add postgresql* to list of databases to remove if it is installed on your system.

5. Remove Repositories

  • Ubuntu:

    sudo rm -f /etc/apt/sources.list.d/mongo* /etc/apt/sources.list.d/nginx.list
    sudo rm -f /etc/apt/sources.list.d/StackStorm* /etc/apt/sources.list.d/nodesource*
    
  • RHEL/CentOS:

    sudo rm -f /etc/yum.repos.d/mongodb-org* /etc/yum.repos.d/StackStorm*
    sudo rm -f /etc/yum.repos.d/pgdg-94* /etc/yum.repos.d/nginx* /etc/yum.repos.d/nodesource*
    sudo rm -f /etc/yum.repos.d/rabbitmq_erlang* /etc/yum.repos.d/*rabbitmq-server*
    

5. Clean Up Remaining Content

Some files and directories will still remain after removing packages. This step will remove those last pieces.

  • Ubuntu:

    sudo rm -rf /etc/st2 /opt/stackstorm
    sudo rm -rf /var/log/st2 /var/log/mongodb
    sudo rm -rf /var/lib/mongodb /var/run/mongodb.pid
    sudo rm -rf /etc/redis/redis.conf /var/lib/redis
    sudo userdel -r redis
    
  • RHEL/CentOS:

    sudo rm -rf /etc/st2 /etc/mongod* /etc/rabbitmq /etc/nginx /opt/stackstorm
    sudo rm -rf /var/log/st2 /var/log/mongodb /var/log/rabbitmq /var/log/nginx
    sudo rm -rf /var/lib/rabbitmq /var/lib/mongo
    sudo rm -rf /etc/redis/redis.conf /var/lib/redis
    sudo userdel -r redis
    

At this point, your system is no longer running any StackStorm-related services, and all the main dependencies have been removed. You can either re-install StackStorm, or use this system for other applications.

Note

If uninstalling a version earlier than StackStorm 3.3, add /var/log/mistral and /var/lib/pgsql to the list of directories to remove if present.