0
0
Jenkinsdevops~5 mins

Plugin manager usage in Jenkins - Commands & Configuration

Choose your learning style9 modes available
Introduction
Jenkins plugins add extra features to your Jenkins server. The plugin manager helps you install, update, and remove these plugins easily to customize your automation.
When you want to add support for a new programming language or tool in Jenkins
When you need to update existing plugins to get new features or security fixes
When you want to remove plugins that are no longer needed to keep Jenkins clean
When setting up a new Jenkins server and need to install essential plugins
When troubleshooting plugin issues by reinstalling or rolling back plugins
Commands
This command lists all installed plugins on the Jenkins server to see what is currently available.
Terminal
java -jar jenkins-cli.jar -s http://localhost:8080 list-plugins
Expected OutputExpected
ace-editor 1.1 ansicolor 0.6.2 git 4.10.0 workflow-aggregator 2.6
This command installs the 'git' and 'workflow-aggregator' plugins and restarts Jenkins to apply changes.
Terminal
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin git workflow-aggregator -restart
Expected OutputExpected
Installing git from updates.jenkins.io Installing workflow-aggregator from updates.jenkins.io Restarting Jenkins to apply changes...
-restart - Restarts Jenkins automatically after plugin installation
This command removes the 'ansicolor' plugin from Jenkins to clean up unused plugins.
Terminal
java -jar jenkins-cli.jar -s http://localhost:8080 uninstall-plugin ansicolor
Expected OutputExpected
Uninstalling ansicolor Plugin ansicolor will be removed after next restart.
This command safely restarts Jenkins to complete plugin installation or removal without interrupting running jobs.
Terminal
java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart
Expected OutputExpected
Jenkins is restarting safely...
Key Concept

If you remember nothing else from this pattern, remember: the Jenkins plugin manager lets you add, update, or remove features easily using simple CLI commands.

Common Mistakes
Trying to install plugins without restarting Jenkins
New plugins or updates do not take effect until Jenkins restarts
Always use the -restart flag or run a safe-restart command after installing or uninstalling plugins
Using the wrong Jenkins URL or missing authentication in CLI commands
Commands fail because they cannot connect or authenticate with the Jenkins server
Ensure the Jenkins URL is correct and provide authentication options if needed
Uninstalling plugins that other plugins depend on
This can break Jenkins functionality or cause errors
Check plugin dependencies before uninstalling and remove dependent plugins first if necessary
Summary
Use the Jenkins CLI plugin manager commands to list, install, uninstall, and restart plugins.
Always restart Jenkins after changing plugins to apply updates.
Check plugin dependencies and Jenkins URL/authentication before running commands.