#1008642 purge /gnu/store and /var/guix when guix is purged

Package:
guix
Source:
guix
Description:
GNU Guix functional package manager
Submitter:
Yuxuan Wang
Date:
2022-06-09 02:03:06 UTC
Severity:
normal
#1008642#5
Date:
2022-03-29 21:00:01 UTC
From:
To:
Dear Maintainer,

I have been using both guix and nix-setup-systemd on this machine for a while,
until one day I run out of inodes on the root partition. At the time that
happened I knew it would be caused by one of guix and nix, but not sure which,
so I deleted both (by using `apt purge guix nix-setup-systemd` then
`rm -Rf /nix /gnu`).

When deleting both I realized that it's actually nix causing excessive inodes
used, not guix, so I tried to reinstall guix by `apt install guix`.

But after reinstalled guix it's no longer usable. Whenever I try guix pull it
throws:

    $ guix pull
    Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
    Authenticating channel 'guix', commits 9edb3f6 to 1d62b15 (100 new commits)...
    Building from this channel:
      guix      https://git.savannah.gnu.org/git/guix.git   1d62b15
    guix pull: error: opening file `/gnu/store/046lwac3v42aw2ggvm7kgps143n4r768-xz.drv': No such file or directory

I checked my other machines with guix installed and they no longer have that
particular package under /gnu/store. My naive understanding is that it's a
package required by the versino of guix installed via `apt install guix`, but I
do not know how it should be populated during the first installation.

#1008642#10
Date:
2022-06-09 01:38:56 UTC
From:
To:
Control: retitle 1008642 purge /gnu/store and /var/guix when guix is purged

You also will need to remove /var/guix as well, as this has databases of
what is in the /gnu/store...

You might be able to "guix build --repair" the individual missing items,
but it is probably easier to completely remove /var/guix and start from
scratch...


I guess "apt purge guix" should actually delete /var/guix and
/gnu/store, though that could be an expensive operation and hard to
revert if done by mistake... a bit tricky to handle correctly if someone
transitions away a .deb packaged guix, though. But I guess in that case
they should remove and *not* purge guix.


live well,
  vagrant

#1008642#17
Date:
2022-06-09 01:50:26 UTC
From:
To:
This would also have helped if you had arbitrary missing or corrupt
items:

  guix gc --verify=contents,repair

But since you know everything was removed, still probably best to start
from scratch.


live well,
  vagrant

#1008642#22
Date:
2022-06-09 01:59:05 UTC
From:
To:
Thank you, Vagrant!

That is certainly helpful. I found out that I also need to remove
$HOME/.cache/guix, but after that I'm now able to start from scratch again.