public boolean deleteQueryById(String userId, String queryId) {

    boolean operationStatus = false;
    if (StringUtils.isNotBlank(queryId) && StringUtils.isNotBlank(userId)) {

      // Fetch all queries from query log file
      ObjectNode queries = fetchAllQueriesFromFile();

      // Get user's query history list
      ObjectNode userQueries = (ObjectNode) queries.get(userId);

      if (userQueries != null) {
        // Remove user's query
        userQueries.remove(queryId);
        queries.set(userId, userQueries);

        // Store queries in file back
        operationStatus = storeQueriesInFile(queries);
      }
    }

    return operationStatus;
  }
deleteQueryById method deletes query from query history file

@param userId Logged in user's Unique Id
@param queryId Unique Id of Query to be deleted
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java