Freeing an Occupied Port on Windows (GitBash)
-
Check which process holds the port:
netstat -ano | findstr :<port> -
Find the process name:
tasklist | findstr <PID> -
Kill it:
taskkill //PID <PID> //F -
Run as Administrator if access is denied. If the port stays stuck, reboot or disable conflicting drivers/services.