Example: Deleting a Statement from the JUNOS Configuration
The following example shows how to delete the ospf statement, effectively unconfiguring OSPF on the router:
[edit]user@host# set protocols ospf area 0.0.0.0
interface so-0/0/0 hello-interval 5[edit]user@host# showprotocols {ospf {area 0.0.0.0 {interface so-0/0/0 {hello-interval 5;}}}}[edit]user@host# delete protocols ospf [edit]user@host# show[edit]user@host#
Delete all statements from the current level down:
[edit]user@host# edit protocols ospf area 0.0.0.0 [edit protocols ospf area 0.0.0.0]user@host# set interface so-0/0/0 hello-interval
5[edit protocols ospf area 0.0.0.0]user@host# delete Delete everything under this level? [yes, no] (no) yes [edit protocols ospf area 0.0.0.0]user@host# show[edit]user@host#
Unconfigure a particular property:
[edit]user@host# set interfaces so-3/0/0 speed 100mb[edit]user@host# showinterfaces {so-3/0/0 {speed 100mb;}}[edit]user@host# delete interfaces so-3/0/0 speed[edit]user@host# showinterfaces {so-3/0/0; }