How to remove Elasticsearch from Ubuntu?
It seems that the startup script for elasticsearch /etc/init.d/elasticsearch
has been left behind after the uninstallation. So, remove it and should be the final step.
You can also try to locate if there are any other left scripts, files or folders using the following command:
# locate elasticsearch
And then remove those as explained in elastic forums here.
Notice that to enable locate
to look everywhere you need to launch the command as root.
for uninstall deb package you can use:
dpkg --purge elasticsearch
or
apt-get --purge autoremove elasticsearch
as mentioned in previous answer you can find all elasticsearch related folders with locate elasticsearch
but before that use updatedb
command.
# updatedb# locate elasticsearch
I will list all default elasticsearch path for more information.
configurations files:
/etc/elasticsearch//etc/default/elasticsearch
base path(bins and libs and ...):
/usr/share/elasticsearch/
data path (can be configured in /etc/elasticsearc/elasticsearch.yml):
/var/lib/elasticsearch
log path (can be configured in /etc/elasticsearc/elasticsearch.yml):
/var/log/elasticsearch/
service files:
/etc/init.d/elasticsearch/etc/systemd/system/multi-user.target.wants/elasticsearch.service/usr/lib/systemd/system/elasticsearch.service