how to close all open localhost ports code example Example: release a port in mac sudo lsof -i :<port>