How to kill a dead screen session?

18,354

Solution 1

screen -wipe PID

will wipe the dead screen.

Solution 2

You need to kill the PID as reported by screen -ls, then wipe the session:

kill -9 3634
screen -wipe

Solution 3

You can send a kill command to the specific screen session.

E.g.

[allen@mmbp ~]$ screen -ls

There is a screen on:

3634.wb_backend (Dead ???)

Remove dead screens with 'screen -wipe'.

1 Socket in /var/run/screen/S-allen.

You would just kill the specific PID

kill 3634
Share:
18,354
Allen Lin
Author by

Allen Lin

Updated on June 04, 2022

Comments

  • Allen Lin
    Allen Lin over 1 year

    Originally posted in Unix and Linux community but no correct answer after a couple of days. I will move the answer there if I get the answer from here. Thanks!

    How do I kill a dead screen session?

    [allen@mmbp ~]$ screen -ls
    There is a screen on:
        3634.wb_backend (Dead ???)
    Remove dead screens with 'screen -wipe'.
    1 Socket in /var/run/screen/S-allen.
    

    I tried screen -X -S 3634.wb_backend quit and here is the result:

    There is a screen on:
    3634.wikibrain_backend  (Dead ???)
    Remove dead screens with 'screen -wipe'.
    No screen session found.
    

    I tried screen -S -X wb_backend kill and here is the result: mkfifo /var/run/screen/S-allen/27272.-X failed

    This (Dead ???) session used to be an Attached session and I used:

    screen -X -S 3634.wb_backend kill
    

    to kill it. It ended up to be in this weird status.

    I have tried:

    screen -wipe
    

    but it didn't work.

    How could I terminate it?