Kill detached screen session

Tim picture Tim · Oct 2, 2009 · Viewed 1.5M times · Source

I learned from somewhere a detached screen can be killed by

screen -X -S [session # you want to kill] kill

where [session # you want to kill] can be gotten from

screen -ls

But this doesn't work. Anything wrong? What's the correct way?

Answer

innaM picture innaM · Oct 2, 2009

"kill" will only kill one screen window. To "kill" the complete session, use quit.

Example

$ screen -X -S [session # you want to kill] quit

For dead sessions use: $ screen -wipe