When a plugin is no longer used in a CloudBees CI environment, it should be removed either from Operations Center or from the appropriate controller. Removing unused plugins provides a number of benefits, such as reducing memory overhead at boot or runtime, reducing configuration options in the web UI, and removing the potential for future conflicts with new plugin updates. You have two choices when removing plugins; uninstall or disable. For more information on uninstalling plugins see Uninstalling plugins.
Disabling a plugin is useful for temporarily “turning off” a plugin, and allowing it to be enabled again in a few hours/days. Jenkins will continue to recognize that the plugin is installed, but it will not start the plugin, and no extensions contributed from the plugin will be visible.
The fragments contributed from a disabled plugin to configuration files would follow the same fate as in the case of uninstalled plugins.
CloudBees CI provides two methods for disabling plugins:
The Plugin Manager in the web UI.
The Jenkins CLI
From the Operations Center or the appropriate controller, select the Manage Jenkins area.
Select Manage Plugins.
Select the Installed tab.
Find the plugin you want to disable.
They are listed in alphabetical order.
Select the checkbox in the Enabled column to the right of the plugin you want to disable.
If the plugin is safe to disable and is not a dependency for other plugins, the checkbox in the Enabled column will be selectable.
A systems administrator can also disable a plugin by creating a file on the Jenkins controller, such as:
The configurations created by the disabled plugin function as if the plugin was uninstalled, insofar as they result in warnings on boot but are otherwise ignored.
To disable a plugin using Jenkins CLI:See the Jenkins CLI tool guide for more information on downloading and configuring the Jenkins CLI tool.
Enter the following command:
java -jar jenkins-cli.jar disable-plugin plugin1 plugin2 plugin3 … [-quiet (-q)] [-restart (-r)] [-strategy (-s) strategy]
disable-plugin command disables one or more installed plugins, using short names. You can specify the verbosity level, how dependencies should be handled, and whether Jenkins should restart after the operation completes.
java -jar jenkins-cli.jar disable-plugin plugin1 plugin2 plugin3 ... [-quiet (-q)] [-restart (-r)] [-strategy (-s) strategy]
The list of plugins to be disabled, specified as the plugin short name.
Be quiet, and print only error messages to the console.
Restart Jenkins after disabling plugins.
Specify handling for plugin dependencies:
|The disable-plugin command was added to Jenkins in v2.151.|
Occasionally a plugin might prevent Jenkins from restarting, for instance if a dependency has been removed, etc. You can disable a plugin when Jenkins is down so that you can restart Jenkins.
To disable a plugin via File System, create a file,
<PLUGIN_ID>.jpi.disabled, inside the
For example, the following command will disable the Green Balls plugin: