Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11046

Project deletion does not wipe out project workspaces

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 1.430 & Red Hat Enterprise Linux Server release 5.5 (Tikanga)

      When a project is deleted, its directory JENKINS_HOME/jobs/<project> is wiped out. Workspace directories are not deleted if they have been defined outside the project directory (in global system configuration), which has been the default for a while. In multi-node environment, there can be several leftover workspaces (on all slaves where the project has been built).

      There is an easy workaround for this. One can manually delete unwanted leftovers. It would be nice if Jenkins could do proper cleaning, or offer workspace deletion when a project is about to be deleted.

          [JENKINS-11046] Project deletion does not wipe out project workspaces

          Sami Salonen created issue -

          Daniel Beck added a comment -

          Build record deletion (and even rename for that matter) was resolved by JENKINS-17138.

          Daniel Beck added a comment - Build record deletion (and even rename for that matter) was resolved by JENKINS-17138 .
          Daniel Beck made changes -
          Summary Original: Project deletion does not wipe out custom workspace and custom build record directories New: Project deletion does not wipe out project workspaces
          Daniel Beck made changes -
          Description Original: When a project is deleted, its directory JENKINS_HOME/jobs/<project> is wiped out. Workspace and build record directories are not deleted if they have been defined outside the project directory (in global system configuration). In multi-node environment, there can be several leftover workspaces (on all slaves where the project has been built).

          There is an easy workaround for this. One can manually delete unwanted leftovers. It would be nice if Jenkins could do proper cleaning, or offer workspace and build record deletion when a project is about to be deleted.
          New: When a project is deleted, its directory JENKINS_HOME/jobs/<project> is wiped out. Workspace directories are not deleted if they have been defined outside the project directory (in global system configuration), which has been the default for a while. In multi-node environment, there can be several leftover workspaces (on all slaves where the project has been built).

          There is an easy workaround for this. One can manually delete unwanted leftovers. It would be nice if Jenkins could do proper cleaning, or offer workspace deletion when a project is about to be deleted.

          Daniel Beck added a comment -

          Note that in case of offline slaves (common with some configurations) many workspaces still wouldn't be deleted.

          A better solution would be improving the periodic WorkspaceCleanupThread, I think.

          Daniel Beck added a comment - Note that in case of offline slaves (common with some configurations) many workspaces still wouldn't be deleted. A better solution would be improving the periodic WorkspaceCleanupThread, I think.

          Anders Hammar added a comment -

          A project's workspace is still not removed when deleting a project, seen in latest Jenkins as of today (v1.587). This with default setup and no extra plugins, on Windows 7 and JDK 1.6.
          A side effect of this is that if a project is deleted and then a new project is created with the same name, the old workspace is then reused. Very confusing!

          Anders Hammar added a comment - A project's workspace is still not removed when deleting a project, seen in latest Jenkins as of today (v1.587). This with default setup and no extra plugins, on Windows 7 and JDK 1.6. A side effect of this is that if a project is deleted and then a new project is created with the same name, the old workspace is then reused. Very confusing!
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 141256 ] New: JNJira + In-Review [ 175444 ]
          Michael Neale made changes -
          Link New: This issue is duplicated by JENKINS-34781 [ JENKINS-34781 ]

          R. Tyler Croy added a comment -

          In my opinion this is a pretty big issue for anybody with long-lived agents floating around

          R. Tyler Croy added a comment - In my opinion this is a pretty big issue for anybody with long-lived agents floating around
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-2111 [ JENKINS-2111 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            salsa Sami Salonen
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: