#First run this, to get port information (with the port you want to kill) sudo lsof -i :3000 #Then run this, with replaced by the value in the column returned by previous command. kill -9
sudo lsof -i :3000 kill -9
sudo lsof -i :3000
npx kill-port port_number e.g, npx kill-port 5001
kill -9 $(lsof -ti:3000,3001)
kill -9