Categories
Coding Computers

How to Delete a Static/Persistent Route in Windows

In Windows, you can use the route command in the Command Prompt to manage IP routing table entries. If you want to delete a static or persistent route, you can follow these steps:

  1. Open Command Prompt as Administrator:
    • Search for “Command Prompt” or “cmd” in the Start menu.
    • Right-click on “Command Prompt” from the results and select “Run as administrator”.
  2. List Existing Routes (Optional but useful to identify the route to delete):
    route print

    This command will display the IP routing table. Check for the specific route you wish to delete.

  3. Delete the Route:

    Use the following command format to delete a route:

    route delete <destination_network>

    Replace <destination_network> with the destination network of the route you wish to delete.

    For example, if you want to delete a route to the 192.168.1.0 network, you would use:

    route delete 192.168.1.0

    If the route also has a specific gateway defined and just providing the destination doesn’t work, you might need to specify the gateway too:

    route delete 192.168.1.0 mask 255.255.255.0 10.0.0.1

    Here, 192.168.1.0 is the destination network, 255.255.255.0 is the subnet mask, and 10.0.0.1 is the gateway.

  4. Close Command Prompt after you’ve made the necessary changes.

Please note that changes made using the route command without the -p option are non-persistent and will be lost after a system reboot. If you had added a persistent route earlier (with the -p option), deleting it using the above method will remove it permanently.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.