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# show
- protocols {
-
- 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# show
- interfaces {
-
- so-3/0/0 {
- speed 100mb;
- }
- }
- [edit]
- user@host# delete interfaces so-3/0/0 speed
- [edit]
- user@host# show
- interfaces {
- so-3/0/0;
- }
For information about how to use regular expressions to delete related configuration items, see Using Global Replace in a JUNOS Configuration—Using the Upto Option.