code: public void removeCollection(String collectionName) throws SolrException {
          try {
              CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName);
              request.process(solrClient);
          } catch (SolrServerException | IOException e) {
              throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);
          }
      }
docs: Remove a collection.
  
  @param collectionName Collection name
  @throws SolrException SolrException