From 97d565c786ee1a1eb920ed66384f60aad20e5cc2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 19 Oct 2022 12:19:04 +0300 Subject: guix gc: Add '--vacuum-database'. * guix/scripts/gc.scm (show-help, %options): Add '--vacuum-database'. * guix/store/database.scm (vacuum-database): New procedure. * doc/guix.texi (Invoking guix gc): Document the option. --- doc/guix.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 7806b21a0f..1eb47e31cf 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4531,6 +4531,18 @@ import, unless it was started with @option{--disable-deduplication} this option is primarily useful when the daemon was running with @option{--disable-deduplication}. +@item --vacuum-database +@cindex vacuum the store database +@comment Avoid words like 'repair,' 'compress,' and 'optimize.' +Guix uses an sqlite database to keep track of the items in (@pxref{The Store}). +Over time it is possible that the database may grow to a large size and become +fragmented. As a result, one may wish to clear the freed space and join the +partially used pages in the database left behind from removed packages or after +running the garbage collector. Running @command{sudo guix gc +--vacuum-database} will lock the database and @code{VACUUM} the store, +defragmenting the database and purging freed pages, unlocking the database when +it finishes. + @end table @node Invoking guix pull -- cgit v1.2.3