When index creation or reindex fails or is interrupted, there might be stale aliases left sitting around, which block further reindexing and in general waste space. We should have a maintenance script that allows to clean them up.
The procedure for removing the indexes is already documented at https://wikitech.wikimedia.org/wiki/Search#Removing_Duplicate_Indices but the script should:
- Handle both clusters via --cluster option
- Allow single-wiki cleanup via --wiki
- Allow also all-wikis cleanup via suitable option