Question

I have a bunch of screen sessions running on my machine, but all of them are detached and unneeded. Is there a good way to just close all of them, so I have nothing when I type "screen -ls"?

Was it helpful?

Solution

how about

$killall screen
Update

Just to illustrate here are the lines from my machine where I tested this:

blake ~ $  screen -ls
There are screens on:
        10250.pts-0.web01       (Detached)
        446.pts-0.web01 (Detached)
        599.pts-0.web01 (Detached)
        526.pts-0.web01 (Detached)
4 Sockets in /tmp/screens/S-blake.

blake ~ $  killall screen
blake ~ $  screen -ls
No Sockets found in /tmp/screens/S-blake.

OTHER TIPS

Had to use $ killall SCREEN for this to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top