With Cisco devices that run IOS, IOS, XE, etc.. it works they way you described it. You basically have to delete the lines with a no command or if you have not saved the config yet, a reload would put the switch or the router into the state that was before you add the lines.
If you are using devices that run IOS XR, they have added the commit and rollback command.
So, if you make a change and save the config, you can roll it back to the original state.
Unfortunately, Cisco IOS has always lac this feature. If you are using any Juniper device, you can roll back up to 49 times.
It is really a cool feature to have handy when you need it.
Actually there are a set of tools in Cisco IOS that allow this after a fashion. It's not quite as slick as JunOS's commit and revert functions but have a look at "archive" and "configure replace" toolset. It's been around for a couple of years but I've not seen many engineers use it. Perhaps because it's not covered in the certification guides. :)
There are several nice blog articles on third party sites that discuss it in some detail:
The command above means that whenever someone saves the config, a copy is sent straight to the TFTP server. Alternatively, a copy of the latest config is saved into the TFTP server every 7 days (time-period 10080).
Now back to your question, say you got the above config running and you've got the latest config. Now you've done some configuration changes and you "don't like them". The easiest way to revert will be to delete the startup-config in your appliance and copy the latest config (found in your TFTP server) back to your appliance's startup config.
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...