Quickly remove all kernel routes to reset routing state and prepare for a fresh configuration. 18.06.2026 | reading time: 2 min The "route -f" option from the classic net-tools suite removes entries from the kernel IP routing table, offering a blunt but fast way to clear routing state before reconfiguration; it is powerful, requires root and can drop connectivity instantly. Reset routing live Here is a hands-on demonstration showing the routing table before and after a flush: ```bash $ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.0.2.1 0.0.0.0 UG 0 0 0 eth0 192.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 $ sudo /sbin/route -f # no output on success; routing table flushed $ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo ``` Be careful: running this on a remote machine will likely sever your SSH connection until routes are restored. When to press the button Use a full flush when a script needs a clean slate, for test labs, or to remove stale gateway entries left by buggy scripts, but avoid it on production boxes without console access; "route -f" operates at the kernel level, needs root privileges, and does not persist changes across reboots unless your network scripts or configuration files are updated accordingly. Safer modern choices On contemporary systems prefer iproute2: for example use "ip route flush table main" or remove specific entries with "ip route del" to avoid total outage; other options include restarting the network service or using NetworkManager tools like "nmcli" to reapply connections, which often handle dependencies more gracefully. Final note The old "route -f" remains a quick, honest tool for certain maintenance tasks, but learning the iproute2 equivalents and service-managed workflows prevents accidental lockout and fits modern Linux administration best practices; deepen your skills and consider exam preparation such as CompTIA Linux+ or LPIC-1 with focused courses at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. network utilities troubleshooting