Skip to content

devlanes is in beta and not ready for production use.Report an issue

Remove lanes

Use this after you delete worktrees, rename a project or want a lane to start over with empty data.

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.

~/dev/myapp
$ devlanes lane gc
$ devlanes lane gc --yes

The 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.

Check first with --dry-run, which lists what the clean would stop, run and delete. Then clean it.

~/dev/myapp
$ devlanes lane clean 1 --dry-run
$ devlanes lane clean 1 --yes

A worktree that is still there gets a new, empty lane at its next start.

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.

devlanes.yaml
lanes:
removed_worktrees: clean

The lanes of the old name stay and keep running. Stop them, then clean them with devlanes lane gc --yes.

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.

Terminal window
$ devlanes daemon reset-state --yes