MacOS kill port using CLI Method 1 lsof -P | grep ':3000' | awk '{print $2}' | xargs kill -9 Method 2 lsof -wni tcp:3000 # then, use the number in the PID column to kill the process: kill -9 PID