{"id":1639,"date":"2016-09-22T21:41:44","date_gmt":"2016-09-22T21:41:44","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1639"},"modified":"2016-09-22T22:35:03","modified_gmt":"2016-09-22T22:35:03","slug":"how-to-uninstall-elasticsearch-and-kibana","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2016\/09\/how-to-uninstall-elasticsearch-and-kibana\/","title":{"rendered":"How to uninstall  Elasticsearch and Kibana"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1640\" src=\"http:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2016\/09\/phpmind-kibana.png\" alt=\"phpmind-kibana\" width=\"948\" height=\"366\" srcset=\"https:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2016\/09\/phpmind-kibana.png 948w, https:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2016\/09\/phpmind-kibana-300x116.png 300w, https:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2016\/09\/phpmind-kibana-768x297.png 768w, https:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2016\/09\/phpmind-kibana-624x241.png 624w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/p>\n<p>(1) Remove previous versions of ElasticSearch:<\/p>\n<pre><code>sudo apt-get --purge autoremove elasticsearch\r\n<\/code><\/pre>\n<p>(2) Remove the ElasticSearch directories:<\/p>\n<pre><code>sudo rm -rf \/var\/lib\/elasticsearch\/\r\nsudo rm -rf \/etc\/elasticsearch\r\n<\/code><\/pre>\n<p>(3) Install ElasticSearch 1.6:<\/p>\n<pre><code>sudo dpkg -i elasticsearch-1.6.0.deb\r\n<\/code><\/pre>\n<p>(4) Start the service:<\/p>\n<pre><code>sudo service elasticsearch start\r\n<\/code><\/pre>\n<p>(5) Test if it works:<\/p>\n<pre><code>sudo service elasticsearch status\r\ncurl -XGET \"http:\/\/localhost:9200\/_cluster\/health?pretty=true\"\r\ncurl \"localhost:9200\/_nodes\/settings?pretty=true\"<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h2>Remove Kibana<\/h2>\n<p>Things you can use to resolve this situation:<\/p>\n<ol>\n<li>reinstalling and then removing\n<pre><code>sudo apt-get install --reinstall kibana\r\nsudo apt-get remove kibana\r\n<\/code><\/pre>\n<\/li>\n<li>single remove without purge\n<pre><code>sudo apt-get remove kibana\r\n<\/code><\/pre>\n<\/li>\n<li>force installing and removing\n<pre><code>sudo apt-get -f install\r\nsudo apt-get remove --purge kibana\r\n<\/code><\/pre>\n<\/li>\n<li>force removing by <code>dpkg<\/code>\n<pre><code>sudo dpkg -r --force kibana<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2>How do I determine the total size of a directory (folder) from the command line?<\/h2>\n<p>The command <code>du<\/code> &#8220;summarizes disk usage of each FILE, recursively for directories,&#8221; e.g.,<\/p>\n<pre><code>du -hs \/path\/to\/directory<\/code><\/pre>\n<h2>How to find the path of the local git repository when I am possibly in a sub-directory?<\/h2>\n<pre><code>git rev-parse --show-toplevel<\/code><\/pre>\n<h2>How do I remove a folder?<\/h2>\n<p>Be sure the folder is really empty (hidden files\/folders might be in there). Look at the file contents again with<\/p>\n<pre><code>sudo ls -lha \/path\/\r\n<\/code><\/pre>\n<p>If you&#8217;re <em>absolutely certain<\/em> that it doesn&#8217;t contain anything you want to have (including subdirectories), delete it with<\/p>\n<pre><code>sudo rm -r -f \/path\/\r\n<\/code><\/pre>\n<p>The <code>-r<\/code> makes it delete the folder (and subfolders), even if it is non-empty, <code>-f<\/code> is for <em>force<\/em> (this might be unnecessary).<\/p>\n<h2>How to know elastic search installed version from kibana?<\/h2>\n<p><code>\/opt\/kibana\/bin\/kibana --version<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; (1) Remove previous versions of ElasticSearch: sudo apt-get &#8211;purge autoremove elasticsearch (2) Remove the ElasticSearch directories: sudo rm -rf \/var\/lib\/elasticsearch\/ sudo rm -rf \/etc\/elasticsearch (3) Install ElasticSearch 1.6: sudo dpkg -i elasticsearch-1.6.0.deb (4) Start the service: sudo service elasticsearch start (5) Test if it works: sudo service elasticsearch status curl -XGET &#8220;http:\/\/localhost:9200\/_cluster\/health?pretty=true&#8221; curl &#8220;localhost:9200\/_nodes\/settings?pretty=true&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[58,59],"tags":[],"class_list":["post-1639","post","type-post","status-publish","format-standard","hentry","category-elasticsearch","category-kibana"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1639"}],"version-history":[{"count":6,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1639\/revisions"}],"predecessor-version":[{"id":1646,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1639\/revisions\/1646"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}