Skip to main content
Back to Commands
Session ManagementPrefix + : kill-session (command mode)

kill-session

Destroy the given session, closing any windows linked to it and no other sessions, and detaching all clients attached to it.

Synopsis

bash
tmux kill-session [-aC] [-t target-session]

Options

FlagDescription
-aKill all sessions except the one specified by -t
-CClear alerts (bell, activity, silence) in all windows
-t target-sessionSpecify which session to kill

Examples

Kill the session named 'dev'

bash
tmux kill-session -t dev

Kill all sessions except the current one

bash
tmux kill-session -a

Kill all sessions except 'main'

bash
tmux kill-session -a -t main

Default Keybinding

Prefix + : kill-session (command mode)

Default prefix is Ctrl+b

Pro Tips

  • Be careful - this permanently destroys the session
  • Use 'tmux kill-server' to kill all sessions at once
  • Consider detaching instead if you might need the session later