If you delete a worktree folder with rm -rf instead of git worktree remove, git still thinks it exists. The branch then stays locked to a folder that’s gone.
git worktree prune -n -v
git worktree prune
In git worktree list, such a worktree is marked prunable. git worktree prune removes the administrative files git keeps for it in .git/worktrees. With -n -v it only tells you what it would remove, for example Removing worktrees/hotfix: gitdir file points to non-existent location.
The practical effect: as long as git thinks a worktree has a branch checked out, you can’t check out that branch anywhere else. After pruning, the branch is free again. Only the bookkeeping goes; the branch and its commits are untouched.
I’d rather use git worktree remove ../hotfix in the first place. It deletes the folder and the bookkeeping in one go, and it refuses when there are uncommitted changes, a nice safety net.
Don’t prune a worktree on a USB disk or network share that’s simply not mounted right now. To git it looks the same as a deleted folder. Lock those with git worktree lock and prune will leave them alone.
Further reading: git-worktree documentation