# Remove Jenkins from Linux (CentOS 8)

In 
Published 2020-11-25

In this tutorial I will present who to remove Jenkins from Linux (CentOS 8).

Here are the steps :

  1. (optional) See if Jenkins is installed using the command which jenkins. And you will see something like this:

  2. (optional) Generally Jenkins is installed as a service, so we can check the status of the service using systemctl status jenkins command :

  3. Remove Jenkins from Linux/ CentOS using dnf remove jenkins command:

Type "y" and you will remove Jenkins from Linux (CentOS).

  1. Remove the Jenkins Working Directory

A working directory stores all the metadata, secrets, plugins, logs, configurations, and build artifacts. By default, it is set to /var/lib/jenkins. We can take a look inside this directory using ls /var/lib/jenkins command:

To remove this information which is no longer useful we need to run the rm -rf /var/lib/jenkins command:

Now you can Install Jenkins on Linux (CentOS 8) again if you want. 🙂