title: how can I know whether the plugin is used by any jobs in jenkins
body: <p>Jenkins had 600+ plugins, in the real system, we are used to install lots of plugins.</p>
  
  <p>And sometimes, we want to remove some plugins to make system more clean or replace with another mature plugin (different name).</p>
  
  <p>This needs to make sure no one/no job use those plugins or I need to notify them.</p>
  
  <p>Are there any ways in configuration or somewhere in Jenkins system to know whether the plugin is used by any jobs ?</p>
  
  <p><strong>UPDATE 2013</strong>
  Based on the answer below, I maintain the simple "plugin:keyword" mapping, like</p>
  
  <pre><code>plugin_keys = {
      "git":'scm class="hudson.plugins.git.GitSCM"',
      "copyartifact":"hudson.plugins.copyartifact.CopyArtifact",
          # and more      
  }
  </code></pre>
  
  <p>And search the plugin keyword from the <code>config.xml</code>, all the information (plugins,jobs,config) can be fetched via <a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API" rel="noreferrer">jenkins remote API</a></p>
  
  <p>it works for me.</p>
  
  <p><strong>UPDATE 2014.04.26</strong>
  Later jenkins version, it seems the config.xml is changed to have plugin name there directly</p>
  
  <p>Like</p>
  
  <pre><code>&lt;com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github@1.4"&gt;
  &lt;hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents@1.7.2"&gt;
  &lt;hudson.plugins.disk__usage.DiskUsageProperty plugin="disk-usage@0.18"/&gt;
  &lt;scm class="hudson.plugins.git.GitSCM" plugin="git@1.4.1-SNAPSHOT"&gt;
  </code></pre>
  
  <p>Therefore I just check this <code>plugin="&lt;plugin name&gt;"</code> in <code>config.xml</code>, it works again</p>
  
  <p><strong>UPDATE 2014.05.05</strong></p>
  
  <p>See complete script in gist <a href="https://gist.github.com/larrycai/81234c5b9c4865234066" rel="noreferrer">jenkins-stats.py</a></p>
  
  <p><strong>UPDATE 2018.6.7</strong></p>
  
  <p>There is <a href="https://plugins.jenkins.io/plugin-usage-plugin" rel="noreferrer">plugin usage plugin</a> support this (no REST API yet)</p>