Add a new configuration key agent.upgrade.rollback_window of type time.Duration in elastic-agent configuration.
This key must be a duration string parseable by the time.ParseDuration function.
The default value of this setting is 7 days (or 168h since time.ParseDuration can parse up to hours as unit of time)