How do I update the OS in a toolbox container?

As in the subject

The OS in the image that toolbox list returns is a bit old

How do I update the os of existing containers ?

And how do I update the image itself ? So that new ocntainers don’t start with an old OS ?

Please be more specific. At least the Fedora and Kernel version would be good to know.

If you speaking from toolbox as a container with sudo dnf upgrade

If you talk from official toolbox images just download/create a new one.

Toolbox :: Fedora Docs

In general, in container-based workflows, you usually don’t update the components within containers from within the container. Though technically there is nothing stopping you from running dnf upgrade from within the container.

Typically, for containers, you want to update the underlying container image. In the case of toolbox, the podman container is “fedora-toolbox”. And you can update it by running podman image pull <image name>:<tag>. If there is a newer version of the container, this will pull it and update it as necessary.

For Example:

yosuke@Yosuke-Thinkpad$ podman image list
REPOSITORY                                 TAG         IMAGE ID      CREATED      SIZE  36          1113918107fb  2 weeks ago  496 MB

yosuke@Yosuke-Thinkpad$ podman image pull fedora-toolbox:36
Trying to pull
Getting image source signatures
Copying blob e6ba7c6e6f56 skipped: already exists  
Copying blob 2bfab29d2ca9 skipped: already exists  
Copying config 1113918107 done  
Writing manifest to image destination
Storing signatures

Thank you !