Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a script for my company that installs all the dependencies we have and sets up some of the software. I need some way to effectively test my script on a clean machine over and over. Is there some way to "reset" the system to the state it was in when it was just installed? Or would the best approach be to have a virtual machine that I can reset?

share|improve this question
up vote 1 down vote accepted

I ended up going with a virtual machine and saving/restoring the state. It's works very well for my purposes at least. It's a bit slower when building a lot of stuff, but you can have multiple "startpoints" depending on what part of the script you're tweaking...

share|improve this answer

One way of doing it would be to clone / backup your existing installation. When you need a clean state, just clone the image back to your hard disk. Example guide can be found here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.