code: public void deleteFile(Object projectIdOrPath, String filePath, String branchName, String commitMessage) throws GitLabApiException {
  
          if (filePath == null) {
              throw new RuntimeException("filePath cannot be null");
          }
  
          Form form = new Form();
          addFormParam(form, isApiVersion(ApiVersion.V3) ? "branch_name" : "branch", branchName, true);
          addFormParam(form, "commit_message", commitMessage, true);
          Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
  
          if (isApiVersion(ApiVersion.V3)) {
              addFormParam(form, "file_path", filePath, true);
              delete(expectedStatus, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files");
          } else {
              delete(expectedStatus, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
          }
      }
docs: Delete existing file in repository
  
  <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/files</code></pre>
  
  file_path (required) - Full path to file. Ex. lib/class.rb
  branch_name (required) - The name of branch
  commit_message (required) - Commit message
  
  @param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
  @param filePath full path to new file. Ex. lib/class.rb
  @param branchName the name of branch
  @param commitMessage the commit message
  @throws GitLabApiException if any exception occurs