How can I remove the current process/application which is already assigned to a port?
For example: localhost:8080
localhost:8080
If you already know the port number, it will probably suffice to send a software termination signal to the process (SIGTERM):
kill $(lsof -t -i :PORT_NUMBER)