From 528f24e044bf8a22bacc9ab388310da6a54fbc09 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Tue, 5 Jul 2022 18:36:49 +0200 Subject: [PATCH] docs: provide uninstall guidance (#1938) --- docs/admin-manual/uninstall.md | 123 +++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 docs/admin-manual/uninstall.md diff --git a/docs/admin-manual/uninstall.md b/docs/admin-manual/uninstall.md new file mode 100644 index 000000000..72fd04b57 --- /dev/null +++ b/docs/admin-manual/uninstall.md @@ -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*" +```