def VacuumIndexes(self):
    if self.args:
      self.parser.error('Expected a single <directory> argument.')

    appyaml = self._ParseAppInfoFromYaml(self.basepath)


    index_defs = self._ParseIndexYaml(self.basepath)
    if index_defs is None:
      index_defs = datastore_index.IndexDefinitions()

    rpcserver = self._GetRpcServer()
    vacuum = VacuumIndexesOperation(rpcserver,
                                    appyaml,
                                    self.options.force_delete)
    vacuum.DoVacuum(index_defs)
Deletes unused indexes.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppCfgApp.VacuumIndexes