24

A similar question was asked for Macs: How to uninstall Jenkins?

How do I do the same on Windows (specifically if I used the Jenkins Windows Installer to install Jenkins)?

My proposed uninstall plan is as follows, but I'm not sure if it is the correct way:

  1. Uninstall the Jenkins Windows Service by executing jenkins.exe uninstall from the command line (as suggested here: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service)
  2. Simply delete the directory: C:\Program Files (x86)\Jenkins
Community
  • 1
  • 1
Niko Bellic
  • 2,370
  • 2
  • 29
  • 25
  • 1
    If you installed with the installer you should have an entry within your control panel - software where you can uninstall it. – Oliver Oct 31 '14 at 15:26
  • For some reason the "C:\Program Files (x86)\Jenkins" directory remains even after uninstalling Jenkins from the Control Panel. Is it okay to just delete this whole directory? – Niko Bellic Oct 31 '14 at 16:35
  • 2
    I'd start by stopping the service first. Maybe that will make sure the directory is deleted after uninstall. If not, simply delete it manually, and make sure the service is removed from Windows Services window. – Slav Nov 03 '14 at 00:00
  • For some reason I didn't see a Jenkins entry under "Add/Remove Programs" (I suppose that was the point of the question), but if you run the same MSI file again it will give you an option to uninstall Jenkins. – Ron Inbar Jun 08 '16 at 09:58

5 Answers5

17

To uninstall jenkins and its slave services

1.Simply go to the directory where jenkins is installed.

2.Then open up a cmd in that directory. (cmd in administrator mode is preferable)

3.jenkins.exe uninstall (this name could be different in case of slave jenkins services like jenkins-slave.exe or something similar, the application is present in the folder)

For Jenkins as services do the same thing except go to its working directory.

In the end you can safely delete the directories.

zalimgandhera
  • 747
  • 1
  • 9
  • 23
14
  1. Find the .msi (Windows Installer) file that you used to install Jenkins. For me, it was in a .zip file in my Downloads folder.
  2. Double-click it. (You can double-click the .msi file inside the compressed folder. There's no need to extract it first.)
  3. Since Jenkins is already installed, Windows Installer will give you options to customize it or remove it.
  4. Choose "Uninstall."
Ron Inbar
  • 2,044
  • 1
  • 16
  • 26
  • 2
    In this way, even after a reboot, Jenkins do not do a clean install, it asks username and password instead of the autogenerated admin password. How to complete restart from scratch? – realtebo Jul 08 '18 at 12:50
  • 1
    @realtebo: First uninstall, then delete the installation folder (e.g. C:\Program Files (x86)\Jenkins\) and finally reinstall. It should now ask you for the secret in the initialAdminPassword file. – jous Mar 28 '19 at 08:17
9

If you want a clean reinstall, you will need to delete some more, in addition to uninstalling and deleting the Jenkins home folder. Otherwise, they will remain there forever and will show up after reinstalling. To completely remove everything for Jenkins from Windows (I am giving this information from Windows 10, 64 bit):

  1. Open Windows Control Panel and click Programs and Features

  2. Right-click Jenkins x.xxx.x (where x.xxx.x, is the Jenkins version), and select Uninstall.

  3. Follow the directions.

  4. When done, delete the following folders: (note: DO NOT remove the jenkins.jenkins or jenkinswar folders if you want to keep the projects and plugins.)

    C:\Program Files\Jenkins or C:\Program Files (x86)\Jenkins C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins C:\Windows\System32\config\systemprofile\AppData\Local\Jenkinswar

  5. Restart the computer.

Rafiq
  • 1,380
  • 4
  • 16
  • 31
0

Building on Rafiq's post, also navigate to C:\ProgramData and delete the folder that is in there. It is a hidden folder so you will need to enable hidden folders

Noah
  • 1
  • 3
0

Go below location and delete ".jenkins" directory

C:\Users<userName>.jenkins

Note : if your not able to remove all files means process is running background , better to restart your system then delete ".jenkins" directory