Exercise 3: Ending Sessions and Cleaning Up Dead Ones — Possible Solution =========================================================================== End "web" cleanly, without attaching: screen -S web -X quit screen -ls # web no longer appears Now kill the db server process forcibly (using the PID from -ls): kill -9 31022 screen -ls The db line is still listed, but marked as dead, for example: 31022.db (Dead ???) The process has gone, but its socket file in the screen directory was never removed, because the server had no chance to clean up. Clean up: screen -wipe This removes the dead socket and reports what it removed. Running screen -ls again shows db has gone. WHY THIS WORKS AS AN ANSWER ------------------------------ It contrasts an orderly shutdown (-X quit, which removes the socket itself) with a forced kill (which leaves a dead socket), explaining why "Dead" sessions exist and why kill -9 should be a last resort.