NixOS Generations Trimmer: Difference between revisions

imported>Mike1
m New output shows defaults
imported>Mike1
m New output showing defaults
Line 151: Line 151:


Usage:
Usage:
trim-generations.sh (defaults are: Keep-Gens=10 Keep-Days=7 Profile=user)
        ./trim-generations.sh <keep-gernerations> <keep-days> <profile>


If you enter any parameters, you must enter all three.


(defaults are: Keep-Gens=30 Keep-Days=30 Profile=user)
If you enter any parameters, you must enter all three, or none to use defaults.
Example:
Example:
trim-generations.sh 15 10 home-manager
        trim-generations.sh 15 10 home-manager
... this will work on the home-manager profile and keep all generations from the last 10 days, and keep at least 15 generations no matter how old.
  this will work on the home-manager profile and keep all generations from the
last 10 days, and keep at least 15 generations no matter how old.
 
Profiles available are: user, home-manager, channels, system (root)


Profile choices available: user, home-manager, channels, system (root only)
-h or --help prints this help text.
</syntaxHighlight>
</syntaxHighlight>




[[Category:Tutorial]]
[[Category:Tutorial]]