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.

Manual:
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
registry.fedoraproject.org/fedora-toolbox  36          1113918107fb  2 weeks ago  496 MB

yosuke@Yosuke-Thinkpad$ podman image pull fedora-toolbox:36
Trying to pull registry.fedoraproject.org/fedora-toolbox:36...
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
1113918107fb793917c01c4ecbeb94ff66a48bd2c9aa5a12b3dfd0332143fd9b
2 Likes

Thank you !