Delete unassigned shards in Elasticsearch I had an elasticsearch server, which ran in single node mode.
When dataset reached 1TB, I added second node and relocated couple of shards with reroute api.
Now second node has 2 of 5 shards, but first node still holds all 5 shards and space is not reclaimed.
_cat/shards?v command shows:
new_messages                    3     p      STARTED    974698739 256.6gb 5.188.130.61  el01
new_messages                    3     r      UNASSIGNED                                 

I've found some &quot;solutions&quot; like stop ES and delete files by hand, but I don't like them.
Probably the solution is to delete shards with replica status.
curl -XPUT &quot;localhost:9200/myindex/_settings?pretty=1&quot; -H 'Content-Type: application/json' -d' {&quot;index&quot; : { &quot;number_of_replicas&quot;: 0 } }'