3

I want to find the sessions which only have dead panes, to then kill them. How do I do this?

1 Answer 1

5

You can list all panes and then filter by dead panes:

tmux list-panes -a -F "#{pane_dead} #{pane_id}" | grep "^1"

And you can kill them with

tmux kill-pane -t PANE_ID

combine this into:

tmux list-panes -a -F "#{pane_dead} #{pane_id}" | \
  awk '/^1/ { print $2 }' | xargs -l tmux kill-pane -t

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .