code: @RequirePOST
      public HttpResponse doDoWipeOutWorkspace() throws IOException, ServletException, InterruptedException {
          checkPermission(Functions.isWipeOutPermissionEnabled() ? WIPEOUT : BUILD);
          R b = getSomeBuildWithWorkspace();
          FilePath ws = b!=null ? b.getWorkspace() : null;
          if (ws!=null && getScm().processWorkspaceBeforeDeletion(this, ws, b.getBuiltOn())) {
              ws.deleteRecursive();
              for (WorkspaceListener wl : WorkspaceListener.all()) {
                  wl.afterDelete(this);
              }
              return new HttpRedirect(".");
          } else {
              // If we get here, that means the SCM blocked the workspace deletion.
              return new ForwardToView(this,"wipeOutWorkspaceBlocked.jelly");
          }
      }
docs: Wipes out the workspace.