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 network, you would use:

    route delete

    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 mask

    Here, is the destination network, is the subnet mask, and 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 *