How do I "clean up" a machine after using the local provider?

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:

/etc/init/juju-* 
/etc/lxc/auto/juju-*
/etc/rsyslog.d/25-juju* 
/var/lib/juju/containers/* 
/var/lib/lxc/juju-* 
~/.juju/<env> 
~/.juju/environments/<env>.jenv

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.

  • http://manpages.ubuntu.com/manpages/trusty/en/man1/lxc-ls.1.html
  • http://manpages.ubuntu.com/manpages/trusty/en/man1/lxc-stop.1.html
  • http://manpages.ubuntu.com/manpages/trusty/en/man1/lxc-destroy.1.html

Tags:

Lxc

Juju