Ubuntu – How to “clean up” a machine after using the local provider


I'm doing some testing and sometimes I have issues with containers and juju. How do I clean up a machine so that I can start using the local provider "from scratch" without reinstalling?

Best Answer

  • LXC containers and the Juju environment need to persist through a reboot, so everything is not contained in one place.

    First, ensure that you have the environment destroyed and the containers are not running. Then remove the following files and directories:


    Then you can reboostrap with a clean environment.

    In certain cases you might need to list, stop, and destroy containers by hand, do this before removing the Juju files.