4

I have a deprecated Jenkins plugin installed (WMI Windows Agents Plugin, v1.8.1), and I'm trying to uninstall it.

Problem

When I uninstall the plugin from the Jenkins web UI, it gets stuck at "Uninstallation pending" no matter how long I wait.

What I Tried

When I do a safe restart after a long wait, the UI shows that the plugin is still installed, as if I had not attempted an uninstall. I also tried disabling the plugin before attempting another uninstall—still stuck at pending uninstallation. Doing a yet another safe-restart after a long wait doesn't work either.

Christian
  • 553
  • 4
  • 16
  • Did you first uninstall/delete any nodes configured to use WMI agents? It won't be able to uninstall if still "in use". – Ian W Dec 29 '22 at 04:40
  • @IanW There were already no nodes left that use WMI agents even before attempting to uninstall the plugin. – Christian Dec 29 '22 at 08:37

2 Answers2

10

After you click uninstall, while the status is "Uninstallation pending", click on Available Plugins and without selecting any plugins click on Download now and Install after Restart. For some reason this completes the uninstallation

Abraham Nzau
  • 149
  • 1
  • 5
  • 1
    Tried this but the plugin still isn't removed. :( – Christian Jan 19 '23 at 09:19
  • In my exact case it worked like a charm. Additional context for those interested: Jenkins in a docker container with data stored as a volume. – Tomasz Dzieniak Feb 13 '23 at 00:42
  • That works. You need to then tick the box to instruct Jenkins to restart. Alternatively, i'm guessing you can just restart the Jenkins process manually in the command line (systemctl restart jenkins) – John Doe Jun 16 '23 at 04:42
0

I initially couldn't uninstall the WMI Windows Agents Plugin on Jenkins 2.375.2 either.

This comment on JENKINS-70454 suggested that upgrading to Jenkins 2.375.3 might help, and indeed:
I could uninstall the plugin as expected after upgrading.


FWIW: I assume that hudson.PluginManager#considerDetachedPlugin was somehow responsible for keeping that plugin, as

journalctl -ujenkins | grep windows

showed me

hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/lib/jenkins/plugins/windows-slaves.jpi

after every reboot (but to be honest, I don't know much about detached plugins).

Manfred
  • 2,269
  • 1
  • 5
  • 14