How to reset Jenkins to its factory settings

continuous integrationJenkins

I have installed Jenkins on my Red Hat server following this tutorial. But by mistake I skipped the default plugins part.

I tried deleting /var/lib/jenkins/config.xml but this file getting created again and again.

  • How can I get back to the initial setting where I can do it correctly this time?
  • Or is there a way I can go to default plugin installation without doing much changes?

I tried googling but all the documents that match are for resetting admin passwords.

NOTE: I do know that I can go to plugin management and install the
plugins I want. However, I'm currently ended up with a blank slate and
I'm not sure which are all the plugins I should install.

Best Answer

An earlier answer mentioned a .jenkins file or folder. At least on my jenkins instance on CentOS no such file exists.

edit /var/lib/jenkins/config.xml and change the following line to:

<installStateName>NEW</installStateName> then service jenkins restart

enter image description here