aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2018-08-08 21:21:21 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2018-08-08 21:21:21 +0200
commit58a85fa4621faaa89286065f5583328783085722 (patch)
tree2878e698e7bfd37250e48708f5da331479021117 /src/libstore/gc.cc
parent103ad1598c4708735412ffbb4f8ef9730ec071d2 (diff)
mention nix-store --query --roots when a path cannot be deleted
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index b415d5421..65220a9f6 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -791,7 +791,11 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
assertStorePath(i);
tryToDelete(state, i);
if (state.dead.find(i) == state.dead.end())
- throw Error(format("cannot delete path '%1%' since it is still alive") % i);
+ throw Error(format(
+ "cannot delete path '%1%' since it is still alive. "
+ "To find out why use: "
+ "nix-store --query --roots"
+ ) % i);
}
} else if (options.maxFreed > 0) {