Home Explore Blog CI



nix

1st chunk of `src/nix/profile-wipe-history.md`
8c4a0d82a324d2b0c6a7357181fa5843da288d65dc3d20ec00000001000001f6
R""(

# Examples

* Delete all versions of the default profile older than 100 days:

  ```console
  # nix profile wipe-history --profile /tmp/profile --older-than 100d
  removing profile version 515
  removing profile version 514
  ```

# Description

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.

)""

Title: nix profile wipe-history: Deleting Old Profile Versions
Summary
The `nix profile wipe-history` command removes older, non-current versions of a profile, preventing rollback to those versions. By default, all non-current versions are removed. The `--older-than` option allows specifying a time period, deleting only versions older than the given number of days.