How to terminate cleanly another session left running?
Solution 1:
Bob’s user can send a Kill signal to all their processes.
sudo su - bob
kill -9 -1
This leaves all non Bob processes running and sends the non maskable SIGKILL to all processes by that UID. On newer os, some processes will respawn as uses Bob, but you’ll have cleaned them up momentarily and the old session will be gone.