toolbox reset removes ALL containers and images!

Created on 7 Nov 2019  ·  5Comments  ·  Source: containers/toolbox

I don't really like this and the behavior surprised me...
I didn't expect toolbox reset would also remove all non-toolbox images (and containers).
I don't feel the warning

All existing podman (and toolbox) containers and images will be removed.

is quite strong enough, or I didn't believe it anyway. ;-)

Most helpful comment

This also surprises me that there is such ordinary command, like reset that does such a global change. I wouldn't have believed the message either 😅
Seeing it right beside the create and enter commands, my first assumption was that it would recreate your fedora-toolbox-31 or at least remove toolbox-created containers.

I think it's dangerous to have it named like this - it could mess up your local-only containers so easily. Perhaps, a different name / location could be a better fit, like:

  • toolbox debug wipe or toolbox develop wipe, the way OSTree does it with it's dangerous unlock command
  • /usr/libexec/toolbox-wipe, the way BTRFS and Systemd put their more-advanced commands

Choosing either (or some other one) would make it clear that this is a special command, and it shouldn't be assumed to behave in any safe way (especially if named wipe) and could also create a framework for new development/dangerous commands to be added.

Thanks!

All 5 comments

Maybe we should put the message in red?

This also surprises me that there is such ordinary command, like reset that does such a global change. I wouldn't have believed the message either 😅
Seeing it right beside the create and enter commands, my first assumption was that it would recreate your fedora-toolbox-31 or at least remove toolbox-created containers.

I think it's dangerous to have it named like this - it could mess up your local-only containers so easily. Perhaps, a different name / location could be a better fit, like:

  • toolbox debug wipe or toolbox develop wipe, the way OSTree does it with it's dangerous unlock command
  • /usr/libexec/toolbox-wipe, the way BTRFS and Systemd put their more-advanced commands

Choosing either (or some other one) would make it clear that this is a special command, and it shouldn't be assumed to behave in any safe way (especially if named wipe) and could also create a framework for new development/dangerous commands to be added.

Thanks!

The darcs project used an obliterate subcommand for a particularly dangerous operation. That's another option.

podman system reset is now a thing in Podman 1.7.0. See https://github.com/containers/libpod/issues/4240

So, we can retire toolbox reset and we can redirect our wishes and complaints to Podman instead! :D

Toolbox has now been rewritten in Go by @HarryMichal The Go version deprecates the reset command in favour of podman system migrate and is now merely a wrapper around it.

Was this page helpful?
0 / 5 - 0 ratings