> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/ams/v3.0/help-and-support/advanced-help-topics/password-history-retention.md).

# Password history retention

Access Manager allows you to store a history of previously used local admin passwords, so that if you recover a device from a backup, you can go back in time and get the local admin password that was active at the time the backup was taken.

AMS policies allow you to define both a minimum number of passwords to keep, as well as the minimum number of days a password should be retained for.

If both the `Number of previous passwords to keep` and `Number of days to keep previous passwords` setting is in use, then old passwords will not be removed until both thresholds have passed. For example, if you had a policy to generate a new password every day, to keep a minimum of 5 passwords, and to keep passwords for 365 days, you would have 365 passwords in your history. More examples are in the table provided below.

| Maximum age | Passwords to keep | Days to keep | Effective number of passwords |
| ----------- | ----------------- | ------------ | ----------------------------- |
| 1           | 50                | 0            | 50                            |
| 1           | 0                 | 50           | 50                            |
| 1           | 5                 | 365          | 365                           |
| 1           | 7                 | 1            | 7                             |
| 1           | 7                 | 7            | 7                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lithnet.io/ams/v3.0/help-and-support/advanced-help-topics/password-history-retention.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
