how to free a port from service code example Example: how to clear a port in linux kill -9 $(lsof -t -i:8080)