RKE2. Free some space. Safely clean snapshots. Clean overlayfs

Ubuntu 22.04 Rancher 2.7.0 rke2
Got 40 GiGs of files: in 2 month of expluatation, help.
42884M /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots
10779M /var/lib/rancher/rke2/agent/containerd/io.containerd.content.v1.content/blobs/sha256

crictl rmi --prune should work but it does not.

crictl -r unix:///run/containerd/containerd.sock ps

FATA[0000] validate service connection: CRI v1 runtime API is not implemented for endpoint “unix:///run/containerd/containerd.sock”: rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService

ctr images list - not showing any images

steel not solwed

HI rancheruser33 - this was driving me nuts too, eventually I found this repo with useful information:

The important bit is that RKE2 has a crictl (no idea what version or anything) out at /var/lib/rancher/rke2/bin/crictl and I was able to do an image prune with that. The containerd socket is unix:///run/k3s/containerd/containerd.sock or you can use the crictl config also provided in that rke2 directory.

Thanks.
It also looks like rancher has some autocleaning mechanism. It starts on around 15% freespace.