Linux - how to delete old *overlay2* data from disk after switching to *containerd* storage backend

Hi,
I recently switched to the new proposed containerd storage backend as proposed in [1,2] . What is the intended way remove the old data e.g. images (the ones stored in /var/lib/docker) from the disk?

After following the steps in [2], docker info returns

Server:
  ...
 Server Version: 29.1.3
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1

[1] Multi-platform | Docker Docs
[2] containerd image store | Docker Docs

Personally I would switch back to the old image store and use the docker image rm command or docker image prune to delete images. Then I would switch back. I would need to test whether deleting the “overlay2” folder under /var/lib/docker is safe. But usually I try not to touch the docker data root manually when there are Docker commands to do the same.

Migration Path

To be clear, these changes only impact new installs; existing users will not be forced to containerd. However, you can start your migration now and opt-in.

We are working on a migration guide to help teams transition and move their existing content to the containerd image store.

Source: https://www.docker.com/blog/docker-engine-version-29/#containerd-image-store-becomes-the-default

The migration guide is not available yet. There is a automatic migration feature, but it’s in experimental state: https://docs.docker.com/engine/storage/containerd/#experimental-automatic-migration

In the good old days the typical approach would have been to stop all containers, purge images and containers, before changing the storage driver and restarting the engine to use it. Otherwise, the state of the old storage driver remains as is. You can always change the storage driver back, and clean up the old storage driver state, and switch back to the new one.