Store path contains illegal base-32 character

I have some weird problems in my Nix store. I really don’t want to wipe the disk and reinstall NixOS yet again, so I’m trying to repair it.

✦ ❯ nix store verify --all
error: store path 'gpmf425yaa2anmiaf12p5l0ics14if9-witherable-0.4.2-doc' contains illegal base-32 character ''

I have a suspicion that the problem occurred in an older generation, so I tried to garbage collect it away.

✦ ❯ sudo nix-collect-garbage -d
removing old generations of profile /nix/var/nix/profiles/per-user/root/channels
removing old generations of profile /nix/var/nix/profiles/system
finding garbage collector roots...
deleting garbage...
0 store paths deleted, 0.00 MiB freed
error: executing SQLite statement 'delete from ValidPaths where path = '/nix/store/qwnnlrgwynfi2ihcya5smlsq3c0lz3mm-titlecaps.r36170.tar.xz.drv';': database disk image is malformed (in '/nix/var/nix/db/db.sqlite')

Any suggestions how to approach either of these problems?

Have a look at this thread: Nix store sqlite db corruption

2 Likes