How can I remove unused indexes in Google Application Engine?
As of Feb 2019 it's now:
gcloud datastore indexes cleanup index.yaml
For GAE / Java, the documentation includes this information:
Deleting Unused Indexes
...
When you are sure that old indexes are no longer needed, you can delete them from App Engine using the vacuum_indexes action:
./appengine-java-sdk/bin/appcfg.sh vacuum_indexes myapp/war
This command deletes all indexes for the app that are not mentioned in the local versions of datastore-indexes.xml and generated/datastore-indexes-auto.xml.
It is documented here. Hope that helps.
Deleting Unused Indexes
When you change or remove an index from index.yaml, the original index is not deleted from App Engine automatically. This gives you the opportunity to leave an older version of the app running while new indexes are being built, or to revert to the older version immediately if a problem is discovered with a newer version.
When you are sure that old indexes are no longer needed, you can delete them from App Engine using the following command:
appcfg.py vacuum_indexes myapp/
This command deletes all indexes for the app that are not mentioned in the local version of index.yaml.
In Windows Google AppEngine Java, we have to use appcfg.cmd command to delete unused indexes of deployed application.
Syntax :
appengine-java-sdk-path\bin\appcfg.cmd vacuum_indexes project-root-path\poject-name\war\