Skip to content
Yardmaster Guide

Clean up finished worktrees

For people whose sessions work in separate copies of a git project: Yardmaster removes a copy once its work has a pull request, and the Dev Pipeline panel can tidy the rest on a schedule.

Advanced2 minutes

This page is for people whose sessions work in a worktree: a separate copy of a git project, so several agents can work side by side. Each copy takes disk space, so Yardmaster removes copies whose work is done.

What happens on its own#

When you archive a session whose branch already has a pull request on GitHub, Yardmaster removes its worktree and shows "Cleaned up worktree for" the session's name. To have it clean up quietly, turn off Show a notification when a worktree is cleaned up on archive.

Show a notification when a worktree is cleaned up on archiveSettings, Performance · Default: OnWhen you archive a session that already has a pull request, the worktree is cleaned up automatically. This shows a brief notification when that happens. Turn it off for fully silent cleanup.Open in YardmasterOpens Yardmaster. Don't have it? Download

Tidy the rest from the Dev Pipeline panel#

In the panel's Setup tab, the Worktree cleanup section has two switches, both off at first:

  • Tidy landed worktrees automatically removes, on a schedule, worktrees whose branch has already landed and that have sat idle. It is free. It runs on Windows, where it also shows Recent runs, How often to tidy and Run cleanup now.

  • Session-based cleanup works on every system, for your active Dev Pipeline projects. It removes the safe worktrees for free and starts a careful AI session to look at the uncertain rest.

Did this help?