How can I remove the current process/application which is already assigned to a port?
For example: localhost:8080
Result for windows
In my case 8080 is the port I wants to kill
And 18264 is the PID listening to the port 8080
So the task you have to kill is the pid for the particular port
C:\Users\Niroshan>netstat -ano|findstr "PID :8080"
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 18264
taskkill /pid 18264 /f