{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxc/issues/507","labels_url":"https://api.github.com/repos/lxc/lxc/issues/507/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxc/issues/507/comments","events_url":"https://api.github.com/repos/lxc/lxc/issues/507/events","html_url":"https://github.com/lxc/lxc/issues/507","id":72002937,"number":507,"title":"lxc removal triggers /var/lib/lxc removal","user":{"login":"kiorky","id":90111,"avatar_url":"https://avatars.githubusercontent.com/u/90111?v=3","gravatar_id":"","url":"https://api.github.com/users/kiorky","html_url":"https://github.com/kiorky","followers_url":"https://api.github.com/users/kiorky/followers","following_url":"https://api.github.com/users/kiorky/following{/other_user}","gists_url":"https://api.github.com/users/kiorky/gists{/gist_id}","starred_url":"https://api.github.com/users/kiorky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiorky/subscriptions","organizations_url":"https://api.github.com/users/kiorky/orgs","repos_url":"https://api.github.com/users/kiorky/repos","events_url":"https://api.github.com/users/kiorky/events{/privacy}","received_events_url":"https://api.github.com/users/kiorky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-29T22:05:58Z","updated_at":"2015-04-29T22:30:59Z","closed_at":"2015-04-29T22:30:59Z","body":"Im -1 on automatic removal of /var/lib/lxc which can contain persistent data (from old containers).\r\n\r\nI was removing manually my lxc packages to reinstall them cleanly as i was testing packages version amongst the different lxc PPA, and i noted that from the removal stage i got a\r\n```\r\ndpkg : avertissement : lors de la suppression de lxc, impossible de retirer « /var/lib/lxc » : Périphérique ou ressource occupé - peut-être le répertoire est-il un point de montage ?\r\n```\r\nSorry for the french local, but yes something triggers /var/lib/lxc removal, i think that it should just be left as is."},"comment":{"url":"https://api.github.com/repos/lxc/lxc/issues/comments/97606168","html_url":"https://github.com/lxc/lxc/issues/507#issuecomment-97606168","issue_url":"https://api.github.com/repos/lxc/lxc/issues/507","id":97606168,"user":{"login":"stgraber","id":2230599,"avatar_url":"https://avatars.githubusercontent.com/u/2230599?v=3","gravatar_id":"","url":"https://api.github.com/users/stgraber","html_url":"https://github.com/stgraber","followers_url":"https://api.github.com/users/stgraber/followers","following_url":"https://api.github.com/users/stgraber/following{/other_user}","gists_url":"https://api.github.com/users/stgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/stgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stgraber/subscriptions","organizations_url":"https://api.github.com/users/stgraber/orgs","repos_url":"https://api.github.com/users/stgraber/repos","events_url":"https://api.github.com/users/stgraber/events{/privacy}","received_events_url":"https://api.github.com/users/stgraber/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T22:30:59Z","updated_at":"2015-04-29T22:30:59Z","body":"    root@castiana:~/data/code/lxc/lxd# apt-get remove lxc\r\n    Reading package lists... Done\r\n    Building dependency tree       \r\n    Reading state information... Done\r\n    The following packages will be REMOVED:\r\n      lxc lxc-dev lxc-templates\r\n    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.\r\n    After this operation, 2,168 kB disk space will be freed.\r\n    Do you want to continue? [Y/n] \r\n    (Reading database ... 195964 files and directories currently installed.)\r\n    Removing lxc-templates (1.1.2+master~20150428-0938-0ubuntu1~vivid) ...\r\n    Removing lxc-dev (1.1.2+master~20150428-0938-0ubuntu1~vivid) ...\r\n    Removing lxc (1.1.2+master~20150428-0938-0ubuntu1~vivid) ...\r\n    Removing lxc dnsmasq configuration\r\n    Processing triggers for man-db (2.7.0.2-5) ...\r\n    root@castiana:~/data/code/lxc/lxd# ls /var/lib/lxc\r\n    lxd-01\tlxd-02\r\n\r\nEven if passing --purge, dpkg will not remove a /var directory as long as it contains data.\r\n\r\nI believe it does that by attempting a rmdir and if that fails (as is the case if there's something inside), it just ignores the error and continues, so even if /var/lib/lxc wasn't a mount point in your case, it wouldn't have removed any container.\r\n\r\nClosing the issue since it's not actually an issue :)\r\n"}}