Note

The documentation you're currently reading is for version 2.10.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 systems:

    sudo st2ctl stop
    sudo service nginx stop
    sudo service postgresql stop
    sudo service mongod stop
    sudo service rabbitmq-server stop
    
  • RHEL/CentOS 6.x:

    sudo st2ctl stop
    sudo service nginx stop
    sudo service postgresql-9.4 stop
    sudo service mongod stop
    
  • RHEL/CentOS 7.x:

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

2. Remove Packages

  • Ubuntu:

    If you are using StackStorm only:

    sudo apt-get purge st2 st2mistral st2chatops st2web
    

    If you have Extreme Workflow Composer installed, instead use:

    sudo apt-get purge st2 st2mistral st2chatops st2web bwc-ui st2flow
    
  • RHEL/CentOS:

    If you are using StackStorm only:

    sudo yum erase st2 st2mistral st2chatops st2web st2python
    

    If you have Extreme Workflow Composer installed, instead use:

    sudo yum erase st2 st2mistral st2chatops st2web st2python bwc-ui st2flow
    

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* postgresql* rabbitmq-server erlang* nginx nodejs
    
  • RHEL/CentOS:

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

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*
    

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/mistral /var/log/mongodb
    sudo rm -rf /var/lib/mongodb /var/run/mongodb.pid
    
  • RHEL/CentOS:

    sudo rm -rf /etc/st2 /etc/mongod* /etc/rabbitmq /etc/nginx /opt/stackstorm
    sudo rm -rf /var/log/st2 /var/log/mistral /var/log/mongodb /var/log/rabbitmq /var/log/nginx
    sudo rm -rf /var/lib/pgsql /var/lib/rabbitmq /var/lib/mongo
    

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.