forked from lix-project/lix
Make nix-collect-garbage -d
look into more places
Make it look into the new-style profiles dir, the old-style one, and the target of `~/.nix-profile` to be sure that we don't miss anything
This commit is contained in:
parent
b15cba03c3
commit
64b0cc5bc4
|
@ -77,7 +77,12 @@ static int main_nix_collect_garbage(int argc, char * * argv)
|
|||
return true;
|
||||
});
|
||||
|
||||
if (removeOld) removeOldGenerations(profilesDir());
|
||||
if (removeOld) {
|
||||
std::set<Path> dirsToClean = {
|
||||
profilesDir(), settings.nixStateDir + "/profiles", dirOf(getDefaultProfile())};
|
||||
for (auto & dir : dirsToClean)
|
||||
removeOldGenerations(dir);
|
||||
}
|
||||
|
||||
// Run the actual garbage collector.
|
||||
if (!dryRun) {
|
||||
|
|
Loading…
Reference in a new issue