I am running a Fedora 23 VM. My requirement is very simple:
All the packages that were installed during the running of the VM have to uninstalled when it is given a shutdown signal. In other words, when it reboots it should be like a freshly installed Fedora VM.
What configuration changes should I make to the OS/VM to get this desired effect?
I thought having some script to log package installations, and mark them for removal when the system starts up. Is there an existing dnf/yum method to do this already?
EDIT It was misleading to say that I need a freshly installed VM. If so, a snapshot would have served the purpose. I want to retain my config changes on the VM, like firewall rules, network-config ...(basically most of the things in /etc
)
vagrant destroy
is what you are referring to right? But even that wipes out config data. Correct me, if I am wrong – 0aslam0 Nov 25 '16 at 05:01