From 1185e8e2a443ba380da7dd22c3d7f7bc5bf69811 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 8 Dec 2024 16:03:59 +0900 Subject: [PATCH] docs: add faq tips for buildkit cache folder Help users to find a nerdctl command when they find a dangling cache in buildkit cache folder, as a SEO. Signed-off-by: Hiroshi Miura --- docs/faq.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index 7280c503dba..c2313f9ce16 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -32,6 +32,7 @@ - [Containers do not automatically start after rebooting the host](#containers-do-not-automatically-start-after-rebooting-the-host) - [Error `failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: unable to start unit ... {Name:Slice Value:"user.slice"} {Name:Delegate Value:true} ... Permission denied: unknown`](#error-failed-to-create-shim-task-oci-runtime-create-failed-runc-create-failed-unable-to-start-container-process-unable-to-apply-cgroup-configuration-unable-to-start-unit--nameslice-valueuserslice-namedelegate-valuetrue--permission-denied-unknown) - [How to uninstall ? / Can't remove `~/.local/share/containerd`](#how-to-uninstall---cant-remove-localsharecontainerd) + - [How to clean a dangling cache of buildkit?](#how-to-clean-a-dangling-cache-of-buildkit) @@ -355,3 +356,15 @@ Run the following commands: containerd-rootless-setuptool.sh uninstall rootlesskit rm -rf ~/.local/share/containerd ~/.local/share/nerdctl ~/.config/containerd ``` + +### How to clean a dangling cache of buildkit? + +`buildkit` cache directory is located at `$HOME/.local/share/buildkit/` +in rootless mode, which has same folder structure `/var/lib/buildkit/` in +root mode. + +You can clear the cache objects by running the following command: +``` +nerdctl builder prune +``` +The command produce a progress message of id and size of removed objects.