mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 18:56:16 +02:00
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
81778c8d55
commit
a57810b2ab
1 changed files with 6 additions and 1 deletions
|
@ -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