diff --git a/src/nix/profile-wipe-history.md b/src/nix/profile-wipe-history.md index b4b26286463..ece2d1286de 100644 --- a/src/nix/profile-wipe-history.md +++ b/src/nix/profile-wipe-history.md @@ -15,6 +15,8 @@ R""( This command deletes non-current versions of a profile, making it impossible to roll back to these versions. By default, all non-current versions are deleted. With `--older-than` *N*`d`, all non-current -versions older than *N* days are deleted. +versions older than *N* days are deleted. With `--older-than` `+`*N*, +*N* older versions than the current version will be kept, the rest +removed. )"" diff --git a/src/nix/profile.cc b/src/nix/profile.cc index dd1a1dff37e..901ee50469a 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -832,8 +832,8 @@ struct CmdProfileWipeHistory : virtual StoreCommand, MixDefaultProfile, MixDryRu .longName = "older-than", .description = "Delete versions older than the specified age. *age* " - "must be in the format *N*`d`, where *N* denotes a number " - "of days.", + "must be in the format *N*`d` or `+`*N* where *N* denotes a number. " + "Use `d` for days and `+` for absolute number to keep.", .labels = {"age"}, .handler = {&minAge}, });