How to clear port 8080 in windows

Step 1:

Open up cmd.exe (note: you may need to run it as an administrator, but this isn't always necessary), then run the below command:

netstat -ano | findstr <Port Number>

(Replace with the port number you want, but keep the colon)

The area circled in red shows the PID (process identifier). Locate the PID of the process that's using the port you want.

Step 2:

Next, run the following command:

taskkill /F /PID <Process Id>

Example

STEP - 1
netstat -ano | findstr 8080
TCP  0.0.0.0:18080    0.0.0.0:0     LISTENING    19788
TCP  [::]:18080       [::]:0        LISTENING    19788
STEP - 2
taskkill /F /PID 19788
SUCCESS: The process with PID 19788 has been terminated.

28