Subject: [bug#52805] [PATCH] substitute: Add a ‘--clear-cache’ option.

From: Mathieu Othacehe <[email-masked]>
Date: Mon, 27 Dec 2021 22:12:28 +0100

Hello Tobias,

> Unlike ‘rm -rf ~/.cache/guix/substitute’ this respects XDG_CACHE_HOME.

This script is invoked by the daemon as root. In that context,
%narinfo-cache-directory is "/var/guix/substitute/cache", whereas when
run as an user it is likely: "~/.cache/guix/substitute".

That would mean that users need to run "sudo guix substitute
--clear-cache". Moreover this script is an internal undocumented tool,
so I'm not in favor of adding user commands to it.

Maybe "guix gc" would be a better place?

Thanks,

Mathieu