# Delete visualize page from command line?

**URL:** https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349
**Category:** Kibana
**Created:** [January 23, 2019, 7:30am UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349 "2019-01-23T07:30:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![isarib](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isarib](https://discuss.elastic.co/u/isarib)
#### Post date: [January 23, 2019, 7:30am UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349/1 "2019-01-23T07:30:53Z")

</div>

Hi,

I made a change to a visualization page, setting a value for one of fields perhaps too high, then everything of kibana or elasticsearch crashed at that moment.

From the logs, there are messages of:

{"type":"error","@timestamp":"2019-01-23T06:59:55Z","tags":["fatal","root"],"pid":14010,"level":"fatal","error":{"message":"all shards failed: [search\_phase\_execution\_exception] all shards failed","name":"Error","stack":"[search\_phase\_execution\_exception] all shards failed :: {"path":"/.kibana/doc/\_count","query":{},"body":"{\"query\":{\"bool\":{\"should\":[{\"bool\":{\"must\":[{\"exists\":{\"field\":\"index-pattern\"}},{\"bool\":{\"must\_not\":{\"term\":{\"migrationVersion.index-pattern\":\"6.5.0\"}}}}]}}]}}}","statusCode":503,"response":"{\"error\":{\"root\_cause\":,\"type\":\"search\_phase\_execution\_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed\_shards\":},\"status\":503}"}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:308:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:267:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:165:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4949:19)\n at emitNone (events.js:111:20)\n at IncomingMessage.emit (events.js:208:7)\n at endReadableNT (\_stream\_readable.js:1064:12)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)"},"message":"all shards failed: [search\_phase\_execution\_exception] all shards failed"}

curl -XGET 'localhost:9200/\_cluster/health/balance\_sheet?pretty'  
{  
"cluster\_name" : "elasticsearch",  
"status" : "red",  
"timed\_out" : true,  
"number\_of\_nodes" : 1,  
"number\_of\_data\_nodes" : 1,  
"active\_primary\_shards" : 0,  
"active\_shards" : 0,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0,  
"delayed\_unassigned\_shards" : 0,  
"number\_of\_pending\_tasks" : 3,  
"number\_of\_in\_flight\_fetch" : 0,  
"task\_max\_waiting\_in\_queue\_millis" : 3886,  
"active\_shards\_percent\_as\_number" : 100.0  
}

Is there a way in command line to delete the visualization page which I made changes too? I'm happy to drop that one visualize page if it would bring back everything else.

At this moment, I am unable to access kibana webui.

Cheers.

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 24, 2019, 9:37pm UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349/2 "2019-01-24T21:37:56Z")

</div>

Hi, did you accidentally delete some data files (maybe shards) from Elasticsearch? It looks like your health info is saying your cluster has no shards. That lines up with the error message you see in the logs.

It looks like it's time to restore Elasticsearch data from backup, if you have it.

A saved visualization is a document in Elasticsearch. If you can find the `_id` of the document, you can delete it by ID with a query: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html)

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 24, 2019, 10:01pm UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349/3 "2019-01-24T22:01:35Z")

</div>

I checked with ES devs about what that health info means.

> it means there aren't any copies of that index available (e.g., maybe they shut down their data nodes)

---

<div class="post-metadata">

### Author: ![isarib](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isarib](https://discuss.elastic.co/u/isarib)
#### Post date: [January 25, 2019, 1:40am UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349/4 "2019-01-25T01:40:20Z")

</div>

Thanks,

All sorted and seems to be working again now.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 22, 2019, 1:40am UTC](https://discuss.elastic.co/t/delete-visualize-page-from-command-line/165349/5 "2019-02-22T01:40:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
