You should avoid making changes to the storage pools directly as this can cause the meta data in LXD to get out of sync with reality and cause confusion and issues.
Instead lxc info <instance> would show the snapshots you have, then lxc delete <instance>/<snapshot> would delete them.
Yes you’re going to have some trouble removing the entry now because the underlying storage volumes have been manually removed. So LXD’s database has got out of sync with reality.
Try lxd sql global "delete from instances where name = 'container-temp'"
the container is now removed out of the lxc list. Isthere anything else to do to resync the LXD database or to avoid further trobble with my containers or databases?
There is no re-sync capability. The best thing to do is just use the lxc commands to perform storage operations rather than doing them directly using the underlying tools.