Open In App

How To Uninstall Jenkins On Windows And Linux ?

Last Updated : 12 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Jenkins is a popular open-source server automation that is used for continuous integration and continuous delivery (CI/CD) for building, deploying, and automating projects. Jenkins is one of the most popular tools used by DevOps to facilitate server automation tasks. Jenkins is highly extensible and supports a variety of popular plugins, making it a popular choice for automation tasks and software development. In this article, we are going to learn how we can uninstall Jenkins from Windows and Linux. So, let’s get started.

Steps To Uninstall Jenkins

One may have several reasons to remove Jenkins from the system. If someone wants to upgrade or downgrade Jenkins, it is advised to remove the existing version of Jenkins. Then, the user can install the latest version of Jenkins without any issues. Many individuals want to uninstall Jenkins to free some memory in the system, or for troubleshooting purposes. It is important to keep in mind that whatever the purpose of uninstalling Jenkins make sure to backup important data or configurations from Jenkins.

We are going to see how we can uninstall Jenkins on:

  • Windows
  • Linux

Steps To Uninstall Jenkins On Windows

Let’s start the process of uninstalling Jenkins from Windows completely and with ease. To Uninstall Jenkins follow the below step:

Step 1. Click on the Start Menu

Click on Start Menu and Search ‘add or remove program’. Then after typing this hit enter, After doing this operation ‘apps and features’ will open. Do the same process as shown below in the Image.

Add Or Remove Programs

Start Menu

Step 2: Search Jenkins

Apps & Features screen will open up to you, now search ‘Jenkins’ in the search box. After typing, Jenkins software will appear on the screen, just click on the uninstall option and wait till it gets uninstalled. Do the same process as directed in the below image.

Uninstall Jenkins

Wait till It gets uninstalled from the system. Provide the administration rights and it will get uninstalled as shown in the below image.

Uninstalling Jenkins

Step 3: Delete the Jenkins folder

Go to C: -> Program Files.When your present working directory is “program files” locate the ‘Jenkins’ folder, and delete the whole folder. Look at the below image and follow the steps to uninstall the Jenkins folder.Look at the below image:

Delete the Folder

you successfully uninstall Jenkins from your system. Now let’s go ahead and uninstall it from the Linux too.

Steps To Uninstall Jenkins On Windows

Let’s start the process of removing Jenkins from Linux using the command line and for that be prepared with your terminal!

Step 1: Open Terminal and stop Jenkins services

Before uninstalling Jenkins we have to stop the Jenkins service using the terminal and command so that we can remove Jenkins easily.

To stop the Jenkins service enter the following command:

Command:

sudo systemctl stop jenkins.service

Look at the image and follow the steps to stop the service.

Stop Jenkins service

Step 2: Remove Jenkins File

Removing Jenkins files before uninstalling Jenkins is crucial because sometimes we might face errors as the system won’t be able to uninstall Jenkins. Therefore, we have to initially remove the Jenkins files.

Enter the following command which will remove the Jenkins files from the system:

Command:

sudo rm -rf /var/lib/jenkins

Where,

rm is used to remove or delete a file or folder

-rf is for recursive force, that forces to delete files in a folder recursively.

removing files

we have successfully removed the Jenkins files. Give the root permission to delete files.

Step 3: Uninstalling Jenkins

Now we have taken the necessary measures, it’s about time to uninstall Jenkins from the Linux system and free up some space. Enter the following command and it will remove the Jenkins from your Linux system.

Command:

sudo apt-get remove --purge jenkins

This command will remove all the things that are related to Jenkins and free up your storage.

Removing Jenkins

If asked, type ‘y’ or simply press ‘Enter’ it will remove the Jenkins, this will be asked for the confirmation to delete Jenkins. After this operation, Jenkins will be removed completely.To check whether Jenkins has been removed or not run the same command again.

Command:

sudo apt-get remove --purge jenkins

It will display the error message while saying, it has not been installed in the system. Look at the image

Removed Successfully

You have successfully removed Jenkins from your Linux system.

Jenkins – FAQ’s

How to remove Jenkins using Yum?

Run the following command to uninstall Jenkins using Yum packet manager:

sudo yum remove jenkins

How much space does Jenkins take?

Jenkins usually takes 1Gb but it depends on its usage. It may increase significantly if you are working on many projects.

Minimum requirements to install Jenkins?

The minimum requirement to install Jenkins is 256MB of RAM and 1GB of space should be available.

Is removing Jenkins necessary?

If the system doesn’t have enough storage and you are not working with Jenkins then it is good to uninstall it. You may download it later whenever required.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads