Remove Web Portal from Raspberry Pi
This page aims to help anyone willing to remove the Web Portal from a Raspberry Pi.
Table of content
Prerequisites
- The Raspberry Pi with SSH access and an account with sudo permissions.
Guidelines
⚠️ If you installed the Web Portal prior to June 2024, follow the next guide. Otherwise, read the guidelines just below:
1. Use SSH to connect to the Raspberry Pi.
2. Stop and remove the systemd
service:
$ systemctl stop piguard_portal.service
$ systemctl disable piguard_portal.service
$ rm /etc/systemd/system/piguard_portal.service
$ systemctl daemon-reload
$ systemctl reset-failed
Then, if you check the service status, you should get the following output:
$ systemctl status piguard_portal.service
Unit piguard_portal.service could not be found.
3. Go to the application folder which should be: /home/piguard/app
4. Uninstall the dependencies:
$ sudo pip uninstall -r requirements.txt
5. Then, go back to the parent directory and remove the project:
# Assuming you named the application folder 'app'. Otherwise, use the name you choose.
$ rm -rf app
Guidelines for previous version
We assume you have a Raspberry Pi on which PiGuard v2 Web Portal was installed before June 2024.
1. Use SSH to connect to the Raspberry Pi.
2. Stop and remove the systemd
service:
$ systemctl stop piguard-flask.service
$ systemctl disable piguard-flask.service
$ rm /etc/systemd/system/piguard-flask.service
$ systemctl daemon-reload
$ systemctl reset-failed
Then, if you check the service status, you should get the following output:
$ systemctl status piguard-flask.service
Unit piguard-flask.service could not be found.
3. Go to the application folder which should be: /home/piguard/p2-piguard-flask-dev
4. Uninstall the dependencies:
$ sudo pip uninstall -r requirements/production.txt
# The development ones shouldn't be installed, but in case:
$ pip uninstall -r requirements/development.txt
5. Then, go back to the parent directory and remove the project:
$ rm -rf p2-piguard-flask-dev
6. Ensure there is no files related to the project anymore by running:
$ ls -la
If there is any file named like p2-piguard-flask-dev
or a similar name, remove it.