Shinobi is a fairly simple application with the only main components being FFmpeg, MariaDB and Node.js. So if you only wish to remove Shinobi then you can ignore the steps to remove any of the components.
Although Shinobi should be run in an environment of its own you may have other data from other applications in your MariaDB (or MySQL) database and it is recommended you double check before proceeding.
First you need to stop all the Shinobi processes.
Now backup your database and videos if you want to keep them. Let's assume your Shinobi install is in the default location /home/Shinobi .
To backup MariaDB you can do the following. You don't need to do this if you used SQLite .
mysqldump -u majesticflame -p ccio > /home/ShinobiDatabaseBackup.sql
To backup an SQLite database just move the file. You don't need to do this if you used MariaDB .
sudo mv /home/Shinobi/shinobi.sqlite /home/shinobi.sqlite
To move your videos you can do the following.
sudo mv /home/Shinobi/videos /home/ShinobiVideos
This is the core of Shinobi and does majority of the back end video processing. This package has a few other dependencies. The necessity of installing each can vary based on the OS installed.
To uninstall in Ubuntu you can run the following commands to remove FFmpeg and its dependencies.
sudo apt remove ffmpeg -y && sudo apt autoremove -y
This is the default database engine for Shinobi and only needs to be removed if you are using it over another Database engine like SQLite. Like FFmpeg it comes with a few other packages that can be removed in a similar way.
sudo service mysql stop sudo apt --purge remove mariadb-server -y sudo apt --purge remove "mysql*" -y sudo apt autoremove -y
Now to remove the SQL files in the system you need to run the following.
sudo rm -rf /etc/mysql/ sudo rm -rf /var/lib/mysql/
Node.js is the engine that runs the daemon scripts of Shinobi. It also does the job of the web server in the same daemon. If you used the Node.js repo then you don't need to remove npm . PM2 is used to maintain the Node.js processes.
sudo npm uninstall pm2 -g sudo apt remove nodejs -y && sudo apt autoremove -y
Now remove any residual global modules and data files.
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules sudo rm -rf /usr/local/lib/node* sudo rm -rf /usr/local/include/node* sudo rm -rf /usr/local/bin/node*
Simply delete the Shinobi folder when you are done with it.
rm -rf /home/Shinobi