Delete the Configuration Using NETCONF
In a NETCONF session with a device running Junos OS, the <delete-config>
tag element enables you to delete
all configuration data in the current candidate configuration or in
the open configuration database. Exercise caution when issuing the <delete-config>
tag element. If you commit an empty
candidate configuration, the device will go offline.
To delete the candidate configuration or all data in
the open configuration database, insert the <delete-config>
tag element in the <rpc>
element.
The <target>
tag encloses the <candidate/>
tag, which can refer to either the
candidate configuration or the open configuration database. If a client
application issues the Junos XML protocol <open-configuration>
operation to open a specific configuration database before executing
a <delete-config>
operation, Junos OS
performs the operation on the open configuration database. Otherwise,
the operation is performed on the candidate configuration.
<rpc> <delete-config> <target> <candidate/> </target> </delete-config> </rpc>
If you take the device offline, you will need to access the device through the console port on the device. From this console, you can access the CLI and perform a rollback to a suitable configuration. For more information about the console port, see the hardware manual for your specific device.