Question: I have the following routes that I wish to delete:

```
10.250.0.0           10.250.0.37          UG        1          0

```

I have run the following to delete this with failure.

```
bash-3.2# route delete 10.250.0.0 -netmask 255.255.255.0 10.250.0.37
delete net 10.250.0.0: gateway 10.250.0.37: not in table

```

What is the cause for that failure?

Answer: 
Don't forget the `-p` flag on your route command. This is what makes it persistent.

So rather than doing:

```
route delete 10.250.0.0 10.250.0.37 -netmask 255.255.255.0

```

you should be doing:

```
route -p delete 10.250.0.0 10.250.0.37 -netmask 255.255.255.0

```

If you don't use the `-p` flag when you delete then you'll just experience that the route is still there after you've rebooted (provided the route is persistent in the first place).

You can at any time see all routes with the `netstat -r` command and you can see persistent routes with the `route -p` command.
This is very tricky which I noticed today to delete the route in Solaris 10 specifically.

You need to first run the command 

```
route -p show

```

This will list all the persistent routes added in the system and also the command that was used to create them either for a host route or a network segment route. Otherwise, you are likely to get a message as "Not in File" after running the delete command.

Let me explain in the example below:

```
~# route -p show

 - persistent: route add host 10.47.118.111 10.47.89.1
 - persistent: route add 10.48.145.0/24 10.47.89.18
 - persistent: route add 10.50.21.0 10.47.89.32 -netmask 255.255.255.0

```

Here you see 3 different ways of adding a route has been used.

To delete the first route you need to use:

```
~# route -p delete host 10.47.118.111 10.47.89.1

```

Instead, if you run command:

```
# route -p delete 10.47.118.111/24 10.47.89.1

```

Assuming you had used correct netmask, still you cannot delete the persistent route in this command even though it seems correct command and end up getting message "not in file". This is usually flexible in Red Hat flavor so you can use any method to add/delete routes however not the case with Solaris 10 unsure of other versions or if any fixes.

Similarly to delete 2nd and 3rd persistent routes you need to exactly use:

```
~# route -p delete 10.48.145.0/24 10.47.89.18
~# route -p delete 10.50.21.0 10.47.89.32 -netmask 255.255.255.0

```

Hope this helps when you are clueless of what's happening :)