Yarn restart too long

Hi all,
We have an hopsworks 2.3 deployed in cluster with Yarn in HA; when we try to restart the RM services, he tooks very much time to start, twenty or more minutes.
In the RM logs, we have this message:

2022-08-11 10:23:20,535 INFO org.apache.hadoop.yarn.server.resourcemanager.RMAppManager: Application should be expired, max number of completed apps kept in memory met: maxCompletedAppsInMemory = 1000, but not removing app application_1657531367260_3382 from memory as log aggregation have not finished yet.

The number of completed tasks is more then 10000; there is a method to remove the expired apps from this list, or empty the list of completed apps ?
Where I find the data for this list, in DB hops or hopsworks ? or in History Server services ? or in other place ?

Thank you for responce.

Gianluca

In addition, for skipping the check process i have disabled the yarn recovery options:

yarn.resourcemanager.recovery.enabled
false