Uninstall mastodon

How to Uninstall Matodon completely from your server.

I set up a mastodon server.
The experience was not great and the platform is not great either.

  • It is hard to troubleshoot – difficult to inspect if you are not familiar with ruby. It is difficult to find similar issues of the problems faced.
  • It is heavyweight – requiring ruby, node and postgres. The computer it is being run on must have sufficient space.
  • Difficult to connect and find other people and topics easily
  • The setup does not just work out the box – A 504 error may be received changing a profile and sending a tweet.
  • Logging is poor – log messages do not make it obvious what was wrong
  • It is not popular
  • Hard for a regular person to use
  • Hard for a regualr person to setup
  • Name of the project can easily be spelt wrong: mastadon vs mastodon
  • Not intuitive to use

Uninstall Steps

These are the steps to completely remove it from your system.

Pretty much do the opposite of the installation steps…I used the manual install from source

  1. Remove systemd services

    sudo rm /etc/systemd/system/mastodon-*
    sudo systemctl daemon-reload
    sudo systemctl stop mastodon-sidekiq.service
    sudo systemctl stop mastodon-streaming.service
    sudo systemctl stop mastodon-web.service
  2. Remove Nginx Config

    sudo rm /etc/nginx/sites-enabled/mastodon
    sudo rm /etc/nginx/sites-available/mastodon
  3. Remove the mastodon user

    sudo userdel mastodon
  4. Remove the mastodon folder

    sudo rm -R /home/mastodon/live/
  5. Delete the postgres db and user

    sudo -u postgres psql
    DROP DATABASE mastodon_production;
    DROP USER mastodon;
  6. Uninstall unneed packages

    sudo apt uninstall \
      imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core \
      g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf \
      bison build-essential libssl-dev libyaml-dev libreadline6-dev \
      zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev \
      nginx redis-server redis-tools postgresql postgresql-contrib \
      certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev
  7. Remove DNS records you previously pointed

Alternatives to Mastodon

I have not found a decent decentralised twitter yet…