date_range20-Mar-19
In a NETCONF session with a device running Junos OS, the <delete-config>
tag element enables you to deleteall configuration data in the current candidate configuration or inthe open configuration database. Exercise caution when issuing the <delete-config>
tag element. If you commit an emptycandidate configuration, the device will go offline.
To delete the candidate configuration or all data inthe 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 thecandidate configuration or the open configuration database. If a clientapplication issues the Junos XML protocol <open-configuration>
operation to open a specific configuration database before executinga <delete-config>
operation, Junos OSperforms 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 accessthe 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 manualfor your specific device.