How to filter lxc image list images:?

How to filter lxc image list images: if I want to get list of specific distros (ex: ubuntu,centos,debian), only amd64, with type ‘container’, not VM, and only latest releases?

I do lxc image list images: arch=amd64 --columns 'lat' | grep CONTAINER | egrep "centos|debian|ubuntu" | grep -v cloud | awk '{print $2}' but it should be more natural way I think.

Going from lxc image alias list images: may be easier in this case though it doesn’t have the customizable columns or filtering.

For more complex queries, you may be better off using lxc image list images: --format=json and pipe into jq as a way to do more complex filtering.

1 Like