about summary refs log tree commit diff
path: root/scripts/nix-channel.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-channel.in')
-rwxr-xr-xscripts/nix-channel.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 1733afceb384..3c99f454c6f8 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -53,6 +53,10 @@ sub addChannel {
 sub update {
     readChannels;
 
+    # Get rid of all the old substitutes.
+    system "@bindir@/nix-store --clear-substitutes";
+    die "cannot clear substitutes" if ($? != 0);
+
     # Pull cache manifests.
     foreach my $url (@channels) {
         print "pulling cache manifest from `$url'\n";