Discarding configuration changes
Instead of deleting many specific changes, you can abandon all changes made within a configuration session by using the discard command or by using the exit command with the discard option.
Discard configuration changes by using discard
Using the discard command is the same as deleting all changes made within a configuration session and then committing the changes. Notice also that after the discard command has run, you stay in configuration mode.
vyatta@vyatta# show interfaces dataplane dp0p1p1
+address 192.0.2.21/24
+description “This is a test”
hw-id 00:13:46:e6:f6:87
[edit]
vyatta@vyatta# discard
Changes have been discarded
[edit]
vyatta@vyatta# show interfaces dataplane dp0p1p1
hw-id 00:13:46:e6:f6:87
[edit]
vyatta@vyatta#
You cannot exit from configuration mode with uncommitted configuration changes; you must either commit the changes or discard them. If you do not want to commit the changes, you can discard them by using the exit command with the discard option.
Discard configuration changes by using exit discard
Try exiting from configuration mode with uncommitted configuration changes; you are not able to do so. Discard the changes by entering the exit discard command.
vyatta@vyatta# exit
Cannot exit: configuration modified.
Use 'exit discard' to discard the changes and exit.
[edit]
vyatta@vyatta# exit discard
exit
vyatta@vyatta#