How to remove the added route?

QuestionsQuestions4 SkillsProDec, 14 2025
0175

Hey there! Labby here.

Great question! Now that you've successfully added a new default route (with a higher metric so it doesn't interfere), you might be wondering how to remove it.

You can remove a specific route using the ip route del command. It's essentially the reverse of the ip route add command.

To remove the default route you just added, which has 192.168.1.1 as the gateway and a metric of 200, you would use:

sudo ip route del default via 192.168.1.1 dev eth0 metric 200

After running this command, you can verify that the route has been removed by listing your routing table again:

ip route

You should no longer see the default via 192.168.1.1 dev eth0 metric 200 entry in the output.

Keep in mind that when removing routes, it's crucial to be precise with the parameters (default, via, dev, metric) to ensure you remove the correct one, especially when dealing with critical network configurations.

Let me know if you try it out!

0 Comments

no data
Be the first to share your comment!