Related Documentation
- EX, J, M, MX, PTX, T Series
- Disabling Inheritance of a Junos OS Configuration Group
Using Regular Expressions to Delete Related Items from a Junos Configuration
The Junos OS command-line interface (CLI) enables you to delete related configuration items simultaneously, such as channelized interfaces or static routes, by using a single command and regular expressions. Deleting a statement or an identifier effectively “unconfigures” the functionality associated with that statement or identifier, returning that functionality to its default condition.
You can only delete certain parts of the configuration where you normally put multiple items, for example, interfaces. However, you cannot delete "groups" of different items; for example:
When you delete a statement, the statement and all its subordinate statements and identifiers are removed from the configuration.
To delete related configuration items, issue the wildcard configuration mode command with the delete option and specify the statement path, the items to be summarized with a regular expression, and the regular expression.
![]() | Note: When you use the wildcard command to delete related configuration items, the regular expression must be the final statement. If the Junos OS matches more than eight related items, the CLI displays only the first eight items. |
Deleting Interfaces from the Configuration
Delete multiple T1 interfaces in the range from t1-0/0/0:0 through t1-0/0/0:23:
Deleting Routes from the Configuration
Delete static routes in the range from 172.0.0.0 to 172.255.0.0:
Related Documentation
- EX, J, M, MX, PTX, T Series
- Disabling Inheritance of a Junos OS Configuration Group
Published: 2013-01-15
Related Documentation
- EX, J, M, MX, PTX, T Series
- Disabling Inheritance of a Junos OS Configuration Group