Home > jenkins > HowTo – Jenkins – Remove an Orphaned Workspace

HowTo – Jenkins – Remove an Orphaned Workspace

December 14th, 2014 Leave a comment Go to comments

A couple of times I’ve been left with an orphaned workspace directory after deleting a project.

If you don’t the credentials to remove the directory in the operating system, try this Groovy script:

def command = """rm -rf /var/lib/jenkins/workspace/TheOrpanedWorkspace""" // Create the String
def proc = command.execute() // Call *execute* on the string
proc.waitFor()
print "done";

Categories: jenkins Tags:
  1. No comments yet.
  1. No trackbacks yet.