How to uninstall Ozeki on Linux

The following document is going to show you the steps of uninstalling Ozeki from your Linux computer. The three main parts of this guide are about how you can stop and uninstall Ozeki services, kill Ozeki processes and then delete the remaining files and logs from your computer. All these operations can be done by performing commands in the Terminal. To complete the uninstallation you need basic knowledge of Lunix commands.

Stop and uninstall Ozeki services

To perform the uninstallation, the first thing that you have to do is to open up the Terminal on your Linux host. The Terminal on a Linux computer can be opened by using the Ctrl + Alt + T shortcut, which automatically opens Terminal as Figure 1 demonstrates it.

terminal window
Figure 1 - Terminal window

In the Terminal window, you can start uninstalling Ozeki services. At this point, you have to stop three Ozeki services. The first one is the Ozeki Watchdog service, which scans the other Ozeki services. To stop that service, just type the sudo service ozekiwatchdog uninstall command as you can see it in Figure 2 and hit Enter.

sudo service ozekiwatchdog uninstall

uninstall ozeki watchdog service
Figure 2 - Uninstall Ozeki Watchdog service

The next service that you need to stop is the service of Ozeki Installer. The uninstalling of this service can be done by typing the sudo service ozekiinstaller uninstall command in your Terminal (Figure 3) and then press Enter on your keyboard.

sudo service ozekiinstaller uninstall

uninstall ozeki installer service
Figure 3 - Uninstall Ozeki Installer service

The last service that you need to stop is the service that controls the installed Ozeki applications on your computer. This is the base Ozeki service. To stop and uninstall that service just run the sudo service ozeki uninstall in the Terminal just like in Figure 4.

sudo service ozeki uninstall

uninstall ozeki service
Figure 4 - Uninstall Ozeki service

Kill Ozeki processes manually

Apart from uninstalling Ozeki services, the other option to stop Ozeki applications on your computer is to kill the processes manually. First of all, let's learn how you can list every process that runs on your computer. The ps aux command will do the job as you can see it on Figure 5. By performing this command you will be able to see the list of currently running processes.

ps aux

list all running processes
Figure 5 - List all running processes

As Figure 5 shows above, there are a lot of processes running on your computer and hard to find Ozeki processes in that list. To find them, you need to filter the list of processes. To do that, just type ps aux | grep -i ozeki in the Terminal and hit Enter. The grep -i ozeki part filters the list by searching the Ozeki word in each process, so this command, just like in Figure 6, returns a list only containing Ozeki processes.

ps aux | grep -i ozeki

list ozeki processes
Figure 6 - List Ozeki processes

To shut down a process using Terminal, you need the ID of the process. Figure 7 shows you, where you can find the process ID of each process. Now, by having the exact process ID, you just have to stop the process by applying the sudo kill -9 [PID] command where you need to type the number of the process ID instead of [PID] like in Figure 7. If you press Enter, the command stops the selected process.

sudo kill -9 [PID]

stop the process
Figure 7 - Stop the process

Write a bash script to shut down all Ozeki processes at once

There is a pretty simple way to destroy all processes at once by writing a simple bash script and execute it. To create a bash script file, first, you need the execute the nano kill_precesses.sh command as you can see it on Figure 8. This will create the bash script with the given name and open automatically in GNU nano.

nano kill_processes.sh

create a bash script file
Figure 8 - Create a bash script file

In the opened bash file, you can just copy-paste the code below. This code queries and collects the process ID of each Ozeki process in a list. Then it iterates through them and kills all processes by using the collected process IDs. When you have done writing the script just press Ctrl + S to save and then Ctrl + X to exit GNU nano.

#!/bin/bash
for i in `ps aux | grep -i ozeki | awk '{print $2}'`
do
    sudo kill -9 $i
done

write the bash script
Figure 9 - Write the bash script

Before running your bash script, you have to make it executable first. It can be achieved by a single command. This will be chmod +x kill_processes.sh, so just type it in the Terminal and execute it by pressing Enter as you can see it in Figure 10.

chmod +x kill_processes.sh

make your bash script executable
Figure 10 - Make you bash script executable

The only thing left is just the executing of your bash script. To do that, just type the ./kill_processes.sh command in the Terminal and then hit Enter. By performing this, the bash script will execute and shut down every Ozeki process.

./kill_processes.sh

excecute the bash script
Figure 11 - Execute the bash script

Delete Ozeki files and logs

After uninstalling all Ozeki services, the second part of the uninstallation is to delete the remaining log and other files from the Ozeki directories. These actions also can be performed from the Terminal by running two commands. The first command (sudo rm -rf /usr/lib/Ozeki) deletes every file from the Ozeki folder (Figure 12).

sudo rm -rf /usr/lib/Ozeki

delete files from ozeki folder
Figure 12 - Delete files from Ozeki folder

As the last step of this guide, you need to delete the log files collected during the running of the Ozeki applications. To remove these logs from your computer, you have to type the sudo rm -rf /var/log/ozeki command in the Terminal like in Figure 13 and press Enter.

sudo rm -rf /var/log/ozeki

delete log files
Figure 13 - Delete log files

More information