Categories
Software

How to Delete Static (Persistent) Route in Windows

Understanding Static Routes

Let’s clarify what static routes are:

  • Static Routes: Manually defined pathways for network traffic. As opposed to dynamic routes which are learned automatically, static routes are fixed unless you change them.
  • Persistent Routes: Static routes that are saved across system reboots. These are the ones we’ll focus on deleting.

Methods to Delete Static Routes

There are two main ways to handle this task:

1. Using the Command Prompt

Open an admin Command Prompt: Right-click on the Start menu and select Run as administrator.

View current routes: Run the command route print to see a list of all active routes including persistent ones.

Identify the target route: Find the specific route you want to delete. It’ll be marked as Persistent. Remember the destination network, netmask and gateway.

Delete the route: Use this command structure: route delete <destination network> MASK <netmask> <gateway>

Example: route delete 192.168.10.0 MASK 255.255.255.0 192.168.1.1

2. Through the Registry (Advanced)

Caution: Modifying the registry is risky. Back up your registry before going forward.

Open the Registry Editor: Press the Windows key + R, type regedit, and press Enter.

Navigate to the key: Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes

Identify and delete the route: Each static route will be represented as a value within this key. Find the one you want to remove and right click it, then choose Delete.

Reboot: Changes will take effect after restarting your computer.

Important Things:

Using the route delete command removes the route only temporarily (until the next reboot). If you want a more permanent solution either use the registry method or add the -p flag to the route delete command to make it persistent.

These methods apply to most modern Windows versions, including Windows 10 and Windows 11.

Leave a Reply

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