Steps To Uninstall Jenkins On Linux
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.
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.
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.
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
You have successfully removed Jenkins from your Linux system.
How To Uninstall Jenkins On Windows And Linux ?
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.
Contact Us