Remove lanes
Use this after you delete worktrees, rename a project or want a lane to start over with empty data.
Clean the lanes of deleted worktrees
Section titled “Clean the lanes of deleted worktrees”When you delete a worktree, its lane stops and stays, holding its ports and data. This lists such lanes in every project on the machine, then cleans them.
$ devlanes lane gc$ devlanes lane gc --yesThe list also takes a worktree whose branch has no project file, so switch it back first to keep its lane. A lane whose worktree is gone cannot run its teardown, so drop what its setup made outside devlanes, such as its database in a shared Postgres, by hand.
Clean one lane
Section titled “Clean one lane”Check first with --dry-run, which lists what the clean would stop, run and delete. Then clean it.
$ devlanes lane clean 1 --dry-run$ devlanes lane clean 1 --yesA worktree that is still there gets a new, empty lane at its next start.
Have the daemon clean them by itself
Section titled “Have the daemon clean them by itself”With this in the project file, the daemon cleans a lane shortly after its worktree is deleted. Stop a lane before you move its worktree.
lanes: removed_worktrees: cleanlanesWhich worktrees get a lane, how many ports each lane reserves, and values computed per lane (lane.<name>).
lanes.removed_worktreesWhat happens to a lane whose worktree folder is deleted, for example by git worktree remove after a merge. Defaults to stop, which stops its processes and keeps its data, containers and ports until devlanes lane gc --yes or devlanes lane clean removes them. Set clean to have devlanes clean the lane by itself.
If you renamed the project
Section titled “If you renamed the project”The lanes of the old name stay and keep running. Stop them, then clean them with devlanes lane gc --yes.
If you want to start over completely
Section titled “If you want to start over completely”This stops everything and forgets every lane and box. Containers, volumes and data folders stay, so clean the lanes first if you want those gone.
$ devlanes daemon reset-state --yes