Removing a plugin
You have installed some plugins and now you need to remove a plugin because it's not required. Removing an ElasticSearch plugin is easy if everything goes right; otherwise you need to manually remove it.
This recipe covers both cases.
Getting ready
You need a working ElasticSearch Server installed, with an installed plugin, and you need to stop the ElasticSearch server in order to safely remove the plugin.
How to do it...
Perform the following steps to remove a plugin:
- Stop your running node in order to prevent exceptions due to file removal.
- Using the ElasticSearch Plugin Manager, which comes with its script wrapper (plugin), call the following commands:
- For Linux/Mac OS X, call this:
plugin -remove mobz/elasticsearch-head
You can also use this command:
plugin -remove head
- On Windows, call the following:
plugin.bat -remove mobz/elasticsearch-head
You can also use the command shown here:
plugin.bat –remove head
- For Linux/Mac OS X, call this:
- Restart the server.
How it works...
The Plugin Manager's –remove
command tries to detect the correct name of the plugin and remove the directory of the installed plugin.
If there are undeletable files in your plugin directory (or a strange astronomical event that affects your server), the plugin script might fail; therefore, to manually remove a plugin, you need to follow these steps:
- Go to the plugins directory.
- Remove the directory with your plugin name.