Completely remove Peertube from server?

How do I completely remove Peertube from my server?

Is there a tutorial somewhere I can follow?

thanks.

I don’t think there is such tutorial yet, then this thread might help.
It depends how you did install it

Based on usual installation documented here :

then to uninstall it, reversing the installation might work

This is a totally unverified uninstall, so just what i would do if i had to :

First step is to stop it :

sudo systemctl disable peertube
sudo systemctl stop peertube

and remove its nginx active configuration link

please keep track of where /etc/nginx/sites-available/peertube links to with :

ls -la /etc/nginx/sites-enabled/peertube

this will be needed later to remove it, it usualy is /etc/nginx/sites-available/peertube

then remove site-enabled active configuration and reload nginx.

sudo rm /etc/nginx/sites-enabled/peertube
sudo systemctl reload nginx

from now your peertube instance is no more published, nodejs process was stopped with systemctl and web access stopped and deactivated from nginx.

check if some nodejs process remains, it would indicate you were perhaps not using systemd.

it remains to remove peertube video storage , peertube postgresql databasde, and i don’t know if there is something to do for redis.

Perhaps you might want to do a backup first, i don’t document it here.

from here you will lose everything.

for postgresql ;

sudo -u postgres dropdb -U peertube peertube_prod

for video storage : if it was changed from /var/www/peertube/storage, then it should be found from configuration in /var/www/peertube/config/production.yaml

then sudo rm -rf on directory indicated as storage.

remove nginx configuration you got previously with the ls -l

remove peertube installation rm -rf /var/www/peertube

and remove peertube user

userdel peertube

This is what i would do, still this process can be buggy, and because any untested process is buggy, this one is buggy.

All packages installed can be used for other process, so it is up to you to find if it is a good idea to remove them.

1 Like

Thanks @plhardy

Would you want to add a section in the documentation website? https://framagit.org/framasoft/peertube/documentation/