Note: Applicable for L2025.2 and newer (RKE2).
For <L2025.2 (RKE1) instances, please refer to the guide below:
Optimizing Docker Storage | Sisense
Due to the fact that Containerd is used, the ‘docker’ command is no longer relevant, but ‘crictl’ is used instead.
‘crictl’ is not available in the system PATH by default, so below you will find the steps for ‘crictl’ usage and execution of basic commands for cleaning up the unused objects.
- Navigate to rke2 directory:
cd /var/lib/rancher/rke2/
- Copy ‘crictl’ binary to the path recognizable by your $PATH variable - in this example, it is ‘/usr/local/bin’ :
Sudo cp bin/crictl /usr/local/bin/
- Copy the config file, which is necessary for binary execution,n the/etc directory:
Sudo cp agent/etc/crictl.yaml /etc/
- After performing the steps above, you will be able to execute the ‘crictl’ command directly. Execute the following two commands to 1). Remove all stopped (exited) containers and print the result; 2). Remove all unused container images and print the result:
sudo crictl ps -a --state Exited -q| xargs -r sudo crictl rm | wc -l
sudo crictl rmi --prune | wc -l
This article describes the steps for manual cleaning of stopped and unused containers/images in RKE2 deployments in order to release the storage.
Optimizing Docker Storage | Sisense
Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.