{"id":9609,"date":"2020-01-27T15:11:37","date_gmt":"2020-01-27T15:11:37","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9609"},"modified":"2021-11-13T06:12:14","modified_gmt":"2021-11-13T06:12:14","slug":"how-to-disable-uninstalling-jenkins-a-plugin-when-jenkins-is-down-using-command-line","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-disable-uninstalling-jenkins-a-plugin-when-jenkins-is-down-using-command-line\/","title":{"rendered":"How to disable\/Uninstalling Jenkins  a plugin when Jenkins is down using command line?"},"content":{"rendered":"\n<p><strong>Issue<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A plugin is preventing Jenkins to restart<\/li><li>I need to disable a plugin and Jenkins is down<\/li><\/ul>\n\n\n\n<p><strong>How to Uninstall a jenkins plugin using command line?<\/strong><br> Uninstalling a plugin removes the plugin binary (*.jpi or *.hpi) from the disk. The plugin continues to function normally until you restart Jenkins, but once you restart, Jenkins will behave as if you didn&#8217;t have the plugin to being with. <\/p>\n\n\n\n<p>Uninstalling a plugin, however, does not remove the configuration that the plugin might have created. If you want to scrab the configuration left by uninstalled plugins, go to &#8220;Manage Jenkins&#8221; and click &#8220;Manage Old Data&#8221;. <\/p>\n\n\n\n<p><strong>How to disable a jenkins plugin using command line?<\/strong><br> To disable a plugin via File System, create a file like .jpi.disabled inside the $JENKINS_HOME\/plugins folder. For example, to disable Green balls plugin, run:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$ touch $JENKINS_HOME\/plugins\/greenballs.jpi.disabled<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Plugins that are disabled can be re-enabled from the UI (or by removing *.jpi.disabled (or *.hpi.disabled) file from the disk.)<\/p>\n\n\n\n<p><strong>Reference<\/strong><br> https:\/\/support.cloudbees.com\/hc\/en-us\/articles\/204323074-How-to-disable-a-plugin-when-Jenkins-is-down-<br> https:\/\/wiki.jenkins.io\/display\/JENKINS\/Removing+and+disabling+plugins<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_32863\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_75657\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_32863\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Issue A plugin is preventing Jenkins to restart I need to disable a plugin and Jenkins is down How to Uninstall a jenkins plugin using command line? Uninstalling a plugin removes the plugin binary (*.jpi or *.hpi) from the disk. The plugin continues to function normally until you restart Jenkins, but once you restart, Jenkins&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9807,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[42],"tags":[],"class_list":["post-9609","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jenkins"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=9609"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9609\/revisions"}],"predecessor-version":[{"id":24991,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9609\/revisions\/24991"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/9807"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}