docs: provide uninstall guidance (#1938)

This commit is contained in:
Jonas L 2022-07-05 18:36:49 +02:00 committed by GitHub
parent 652ce53f89
commit 528f24e044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 123 additions and 0 deletions

View File

@ -0,0 +1,123 @@
---
title: Uninstall
sidebar_position: 91
---
This guide provide some guidance to uninstall LibreTime from your system.
We recommend using **disposable devices** for your installations, so you can delete your old system and install on a fresh one easily without worrying about old files.
If you do not have a way use disposable devices, below are commands that should help you remove most of the LibreTime files from your system.
:::warning
Use these commands at your **own risk**, we cannot guarantee that these commands are always up to date!
:::
Remove configuration directories:
```bash
sudo rm -Rf /etc/airtime
sudo rm -Rf /etc/libretime
```
Remove logs directories:
```bash
sudo rm -Rf /var/log/airtime
sudo rm -Rf /var/log/libretime
```
Remove runtime directories:
```bash
sudo rm -Rf /var/lib/airtime
sudo rm -Rf /var/lib/libretime
```
Remove shared directories:
```bash
sudo rm -Rf /usr/share/airtime
sudo rm -Rf /usr/share/libretime
```
Remove systemd services files:
```bash
sudo rm -f /etc/systemd/system/airtime*
sudo rm -f /etc/systemd/system/libretime*
```
Remove apache2 configuration files:
```bash
sudo rm -f /etc/apache2/sites-{available,enabled}/airtime*
sudo rm -f /etc/apache2/sites-{available,enabled}/libretime*
```
Remove php configuration files:
```bash
sudo rm -f /etc/php/*/apache2/conf.d/airtime*
sudo rm -f /etc/php/*/apache2/conf.d/libretime*
```
Remove logrotate configuration files:
```bash
sudo rm -f /etc/logrotate.d/airtime*
sudo rm -f /etc/logrotate.d/libretime*
```
Remove python packages:
```bash
sudo pip3 uninstall \
libretime-analyzer \
libretime-api \
libretime-api-client \
libretime-playout \
libretime-shared \
libretime-celery
# Check if we forgot old python packages.
# Remove packages that show up with this commands.
sudo pip3 freeze | grep libretime
sudo pip3 freeze | grep airtime
```
Delete the postgresql database and user:
```bash
sudo -u postgres dropdb airtime
sudo -u postgres dropdb libretime
sudo -u postgres dropuser airtime
sudo -u postgres dropuser libretime
```
Delete the rabbitmq vhost and user:
```bash
sudo rabbitmqctl delete_vhost airtime
sudo rabbitmqctl delete_vhost libretime
sudo rabbitmqctl delete_user airtime
sudo rabbitmqctl delete_user libretime
```
Delete the file storage (you probably don't want that):
```bash
sudo rm -Rf /srv/airtime
sudo rm -Rf /srv/libretime
```
Search for remaining files:
```bash
sudo find / -name "libretime*"
sudo find / -name "airtime*"
```