OpenPorts is basically a GUI for `lsof`
and `kill`
Use the `lsof`
command on your preferred terminal:
lsof -P -iTCP -sTCP:LISTEN +c0
After running the command above, find the PID of the process you want to terminate.
Use the `kill`
command to gracefully terminate a process:
kill -15 {PID}
If the above doesn't work, the process may be not respoding. You can force kill it with:
kill -9 {PID}