mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 08:49:35 +01:00
* Revived the old "nix-store --delete" operation that deletes the
specified paths from the Nix store. However, this operation is safe: it refuses to delete anything that the garbage collector wouldn't delete.
This commit is contained in:
parent
3c5619c7e4
commit
4b9e7f59ca
4 changed files with 45 additions and 11 deletions
|
|
@ -10,6 +10,7 @@ typedef enum {
|
|||
gcReturnLive,
|
||||
gcReturnDead,
|
||||
gcDeleteDead,
|
||||
gcDeleteSpecific,
|
||||
} GCAction;
|
||||
|
||||
/* If `action' is set to `gcReturnRoots', find and return the set of
|
||||
|
|
@ -19,8 +20,8 @@ typedef enum {
|
|||
closure of) the roots. If `action' is `gcReturnDead', return the
|
||||
set of paths not reachable from the roots. If `action' is
|
||||
`gcDeleteDead', actually delete the latter set. */
|
||||
void collectGarbage(GCAction action, PathSet & result,
|
||||
unsigned long long & bytesFreed);
|
||||
void collectGarbage(GCAction action, const PathSet & pathsToDelete,
|
||||
PathSet & result, unsigned long long & bytesFreed);
|
||||
|
||||
/* Register a temporary GC root. This root will automatically
|
||||
disappear when this process exits. WARNING: this function should
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue