Unable to update NixOS unstable

I am trying to update NixOS unstable on a notebook, but it has an issue and I need help with that.

# nix-channel --update
unpacking channels...
error: syntax error, unexpected $end, at /nix/store/0p8j75qgl3p98fvk46643awm0vy112i6-env-manifest.nix:1:1
error: program '/nix/store/0niikaryxswsig5zs5db1a41yr0pqzkl-nix-2.3.2/bin/nix-env' failed with exit code 1

The file /nix/store/0p8j75qgl3p98fvk46643awm0vy112i6-env-manifest.nix is empty.

I may have interrupted an update on this system some time ago. I do not remember well. Now I want to update it, but I do not know how to fix this issues.

Any clues on this is very well welcome.

1 Like

Following a suggestion from IRC I have tried to repair with the following command:

 # nix-store --verify --check-contents --repair
reading the Nix store...
checking path existence...
checking hashes...
path '/nix/store/07vbgpdc9zm194pxaznz70bz294nq2vc-nixos-20.09pre218613.ae6bdcc5358' was modified! expected hash 'sha256:1z0mmqq6n5667x1kf9hx8030cqg2608wmn2fz6nmaccvsfnmgap3', got 'sha256:0q4kazsn5pygcpd8mpr53b4rmh46mfdpbbmfwjma94qy1anbml57'
error: error parsing derivation '/nix/store/vy8l394xa9a0ih5hri0dp632wmvks26g-nixos-20.09pre218613.ae6bdcc5358.drv': expected string 'Derive(['
path '/nix/store/0p8j75qgl3p98fvk46643awm0vy112i6-env-manifest.nix' was modified! expected hash 'sha256:1qrbqpracddm9kd78jhsz7l97i7z6nl1v1d0plqmynz9387zqrm8', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/0p8j75qgl3p98fvk46643awm0vy112i6-env-manifest.nix'
path '/nix/store/3x21i0dp4lbbby173i35lfab37029j6p-nixexprs.tar.xz' was modified! expected hash 'sha256:1yi9rsaf5zqzc7zcqacm334qrfj1gb4kiyldpz55na95cnjv3f6a', got 'sha256:0hiqdkl65w3bsx3v4cy32lp8sr4lszxn1yw7igb752lrh9nq5kg2'
error: cannot repair path '/nix/store/3x21i0dp4lbbby173i35lfab37029j6p-nixexprs.tar.xz'
path '/nix/store/cdavd47vi7hsa9w0iw8wbpamb8z0br9m-user-environment.drv' was modified! expected hash 'sha256:1qwl50wjs0pc58qdr73i36ch6n5d2p5nr496gw1k8m1d1kvg0kgi', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/cdavd47vi7hsa9w0iw8wbpamb8z0br9m-user-environment.drv'
path '/nix/store/vy8l394xa9a0ih5hri0dp632wmvks26g-nixos-20.09pre218613.ae6bdcc5358.drv' was modified! expected hash 'sha256:039sjlvcchs2kjdf96b6lvsbwr641rmkdiqql9adfycpdf7s7wyj', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/vy8l394xa9a0ih5hri0dp632wmvks26g-nixos-20.09pre218613.ae6bdcc5358.drv'
path '/nix/store/wqfkng3prrx79j8xkr64nlnbll9zfbq0-unpack-channel.sh' was modified! expected hash 'sha256:153drcalrs0j7c7rbryi4ib52qh27xiyv16djr1wjn7v62bhhdq7', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
error: cannot repair path '/nix/store/wqfkng3prrx79j8xkr64nlnbll9zfbq0-unpack-channel.sh'
warning: not all errors were fixed

But it still does not work.