After a commit script changes the configuration, you can remove the change and return the configuration to its previous state.
For persistent changes only, you can undo the configuration change by issuing the delete, deactivate, or rollback configuration mode command and committing the configuration. For both persistent and transient changes, you must remove, delete, or deactivate the associated commit script, or else the commit script regenerates the change during a subsequent commit operation.
Deleting the file filename statement from the configuration effectively “unconfigures” the functionality associated with the corresponding commit script. Deactivating the statement adds the inactive: tag to the statement, effectively commenting out the statement from the configuration. Statements marked as inactive do not take effect when you issue the commit command.
To reverse the effect of a commit script and prevent the script from running again, perform the following steps:
[edit]
user@host# delete (statement | identifier)
user@host# deactivate (statement | identifier)
Alternatively, you can roll back the configuration to a candidate that does not contain the statement.
user@host# rollback number
[edit]
user@host# delete system scripts commit file filename
user@host# deactivate system scripts commit
file filename
[edit]
user@host# commit
[edit]
user@host# exit
user@host> file delete /var/db/scripts/commit/filename