How to use image name like "debian/13" preferred from local?

I use such code to launch a container:

incus launch "images:debian/13" "my-builder" --storage "my_tmp" --config limits.cpu=2 --config limits.memory=8GiB

But I found it creates more and more container images on the host over time:

 $ incus image list local:
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
| ALIAS | FINGERPRINT  | PUBLIC |             DESCRIPTION              | ARCHITECTURE |   TYPE    |   SIZE   |      UPLOAD DATE      |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
|       | 08d6c3519400 | no     | Debian trixie amd64 (20250815_05:24) | x86_64       | CONTAINER | 94.51MiB | 2025/08/15 23:05 CEST |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
|       | 963d4df8af47 | no     | Debian trixie amd64 (20250819_05:24) | x86_64       | CONTAINER | 94.51MiB | 2025/08/19 22:10 CEST |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
|       | 44714ee40631 | no     | Debian trixie amd64 (20250824_05:24) | x86_64       | CONTAINER | 94.52MiB | 2025/08/24 13:53 CEST |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
|       | dd592eb3a543 | no     | Debian trixie amd64 (20250816_05:24) | x86_64       | CONTAINER | 94.51MiB | 2025/08/17 01:08 CEST |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+
|       | f834e737cb14 | no     | Debian trixie amd64 (20250818_05:24) | x86_64       | CONTAINER | 94.51MiB | 2025/08/18 22:31 CEST |
+-------+--------------+--------+--------------------------------------+--------------+-----------+----------+-----------------------+

I think it creates extra load for a remote server and spends space of my laptop without really need for it.

So I have to use local:963d4df8af47 argument, which doesn’t look nice and readable, and it has to be manually “hardcoded” into a script.

incus launch "local:963d4df8af47" "my-builder" --storage "my_tmp" --config limits.cpu=2 --config limits.memory=8GiB

Question

Is there a way, maybe some option, to fetch an image only once and then use this local copy?
Something like --prefer-local or --ignore-remote-updates:

incus launch --prefer-local "images:debian/13" "my-builder" --storage "my_tmp" --config limits.cpu=2 --config limits.memory=8GiB

Whenever you do incus launch, it will check if there’s a newer version of the image, if there is, it will download that and create from it.

Cached images also attempt to self-update (unless that was manually disabled) and they will expire (get auto-deleted) 10 days after they were last used.

So normally, you shouldn’t really have to think about them.

If you really want to control the images, you could use incus image copy images:debian/13 local: --alias debian-13 --auto-update at which point you can use local:debian-13 as the image.

1 Like

@stgraber, FYI: something replaced -- to – in your message, so if anyone will copy-paste it, it can be not easy to troubleshoot why the command is not working.