Killing a localhost Port To close a local server on localhost:8050, do the following: $ lsof -i:8050 $ kill $PID Reference https://superuser.com/questions/1411293/how-to-kill-a-localhost8080 https://stackoverflow.com/questions/19071512/socket-error-errno-48-address-already-in-use