Delete Network & Storage pool

Trying to purge LXD on my system and following the instructions on this page, How to remove LXD from my system

I’ve listed my networks below when I “lxc network delete lxdbr0” I get “Error: The network is currently in use”. Additionally when I delete eno0 and eno1 I get “Error: Network not found”.

When I go to delete the storage pool I get “Error: The storage pool is currently in use”.

$ lxc network ls
+--------+----------+---------+-------------+---------+
|  NAME  |   TYPE   | MANAGED | DESCRIPTION | USED BY |
+--------+----------+---------+-------------+---------+
| eno1   | physical | NO      |             | 0       |
+--------+----------+---------+-------------+---------+
| eno2   | physical | NO      |             | 0       |
+--------+----------+---------+-------------+---------+
| lxdbr0 | bridge   | YES     |             | 1       |
+--------+----------+---------+-------------+---------+


~$ lxc storage ls
+--------------+-------------+--------+-------------------------------------------------+---------+
|     NAME     | DESCRIPTION | DRIVER |                     SOURCE                      | USED BY |
+--------------+-------------+--------+-------------------------------------------------+---------+
| storage-pool |             | zfs    | /var/snap/lxd/common/lxd/disks/storage-pool.img | 1       |
+--------------+-------------+--------+-------------------------------------------------+---------+

Help is appreciated :wink: When I run “lxc profile edit default” all of the changes I make cause an error with the response, " Config parsing error: Device validation failed for “root”: Root disk entry must have a “pool” property set. Press enter to open the editor again or ctrl+c to abort change"

Running

lxc storage show <pool>
lxc network show <network>

Will show you whats using them.

If its the profile you can remove devices from the profile with:

lxc profile device remove <profile> <device>
1 Like

Also worth noting that only managed networks can be deleted from LXD.
The non-managed ones are actually physical network interfaces on your system so can’t be deleted through LXD.

In this case, I expect that your network was in use by the default profile and you just needed eth0 removed from it before the network could be deleted.