<p dir="auto">It'd be nice if there was an upgrade function for the plugin binary to save having to uninstall and then install when a new version of a plugin is released.</p>
<p dir="auto">Even if it was just a download and overwrite to begin with, it could be expanded from there.</p>
<p dir="auto">To update a plugin, we need to remove it first otherwise, elasticsearch will complain that it's already installed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo bin/plugin -install mobz/elasticsearch-head

-&gt; Installing mobz/elasticsearch-head...
Failed to install mobz/elasticsearch-head, reason: plugin directory /usr/share/elasticsearch/plugins/head already exists. To update the plugin, uninstall it first using -remove mobz/elasticsearch-head command"><pre class="notranslate"><code class="notranslate">sudo bin/plugin -install mobz/elasticsearch-head

-&gt; Installing mobz/elasticsearch-head...
Failed to install mobz/elasticsearch-head, reason: plugin directory /usr/share/elasticsearch/plugins/head already exists. To update the plugin, uninstall it first using -remove mobz/elasticsearch-head command
</code></pre></div>
<p dir="auto">I propose that we provide an <code class="notranslate">update</code> switch:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo bin/plugin -update mobz/elasticsearch-head"><pre class="notranslate"><code class="notranslate">sudo bin/plugin -update mobz/elasticsearch-head
</code></pre></div>
<p dir="auto">This should be some sugar that runs the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo bin/plugin -remove mobz/elasticsearch-head
sudo bin/plugin -install mobz/elasticsearch-head"><pre class="notranslate"><code class="notranslate">sudo bin/plugin -remove mobz/elasticsearch-head
sudo bin/plugin -install mobz/elasticsearch-head
</code></pre></div>