# How to disable substitution of expired entries?

**URL:** <https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903>\
**Category:** Uncategorized\
**Created:** [January 13, 2019, 8:49pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903 "2019-01-13T20:49:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rime](https://forum.kee.pm/letter_avatar_proxy/v4/letter/r/bc79bd/32.png) [@Rime](https://forum.kee.pm/u/Rime)\
**Post date:** [January 13, 2019, 8:49pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/1 "2019-01-13T20:49:13Z")

</div>

Hi,

I have a lot expired entries in Keepass DB (date expiration). For some reasons I want to keep these.  
But Kee always suggest expired entries in browser. How to disable this?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![ion](https://forum.kee.pm/letter_avatar_proxy/v4/letter/i/f1d935/32.png) [@ion](https://forum.kee.pm/u/ion)\
**Post date:** [January 14, 2019, 1:45pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/2 "2019-01-14T13:45:44Z")

</div>

You could always hide certain entries from Kee in KeePass by manually editing each entry.

Also this is probably not a use-case for most people. Even if a password expires you would usually still want to fill it one last time to change it and then overwrite it (so it becomes un-expired).

---

<div class="post-metadata">

**Author:** ![Rime](https://forum.kee.pm/letter_avatar_proxy/v4/letter/r/bc79bd/32.png) [@Rime](https://forum.kee.pm/u/Rime)\
**Post date:** [January 14, 2019, 6:21pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/3 "2019-01-14T18:21:06Z")

</div>

Hi, ion!  
Thanks for answer!  
But let me tell a little bit.  
I don’t need to change the password for expired entries. Thus I mark outdated entities.  
There are a lot expired entries and I cann’t change each one for Kee.  
In any case, thank you again for the answer.

---

<div class="post-metadata">

**Author:** ![ion](https://forum.kee.pm/letter_avatar_proxy/v4/letter/i/f1d935/32.png) [@ion](https://forum.kee.pm/u/ion)\
**Post date:** [January 24, 2019, 2:12pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/4 "2019-01-24T14:12:22Z")

</div>

> I don’t need to change the password for expired entries. Thus I mark outdated entities.  
> There are a lot expired entries and I cann’t change each one for Kee.

I assumed as much and was trying to explain why this feature is not implemented (it would not be useful for the majority of users).

Have you considered moving your expired entries to a different group? You can configure Kee to use entries of a single group only ([https://forum.kee.pm/t/is-there-a-way-to-hide-groups-from-kee/1418](https://forum.kee.pm/t/is-there-a-way-to-hide-groups-from-kee/1418))

But the longer I think about it you could request a feature to alow editing the Kee-Tab of multiple entries in KeePass at the same time. With this you could easily hide multiple entries at a time.

EDIT: Also I guess you could use the XML Replace feature of KeePass to automatically set all expired entries to be hidden from KeePass

---

<div class="post-metadata">

**Author:** ![kofaysi](https://forum.kee.pm/user_avatar/forum.kee.pm/kofaysi/32/842_2.png) [@kofaysi](https://forum.kee.pm/u/kofaysi)\
**Post date:** [October 14, 2019, 7:49am UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/5 "2019-10-14T07:49:55Z")

</div>

Dear @ion,

can you please suggest:

- what would be the content of the field for the XML Replace, and/or
- how can one see a full XML code for a single entry, please?

---

<div class="post-metadata">

**Author:** ![ion](https://forum.kee.pm/letter_avatar_proxy/v4/letter/i/f1d935/32.png) [@ion](https://forum.kee.pm/u/ion)\
**Post date:** [October 14, 2019, 6:31pm UTC](https://forum.kee.pm/t/how-to-disable-substitution-of-expired-entries/1903/6 "2019-10-14T18:31:56Z")

</div>

DISCLAIMER: This is not in any way tested. And it might destroy your database!

You should definitely consult the documentation: [[https://keepass.info/help/v2/xml\_replace.html](https://keepass.info/help/v2/xml_replace.html)]

Generally you can export single entries to XML with Entry\>Data Exchange\>Export Entry.  
([https://keepass.info/help/v2/xml\_replace.html](https://keepass.info/help/v2/xml_replace.html))  
An XPath might look something like this:  
//Group/Entry/Times[Expires=‘True’ and  
(  
number(substring(ExpiryTime, 1,4)) \< 2019  
or (  
number(substring(ExpiryTime, 1,4)) = 2019  
and  
number(substring(ExpiryTime, 6,7)) \< 10  
)  
or (number(substring(ExpiryTime, 1,4)) = 2019  
and  
number(substring(ExpiryTime, 6,7)) = 10  
and  
number(substring(ExpiryTime, 9,10)) \< 14  
)  
)  
]/parent::node()/String[Key= ‘KPRPC JSON’]/Value

`//Group/Entry/Times[Expires='True' and ( number(substring(ExpiryTime, 1,4)) < 2019 or ( number(substring(ExpiryTime, 1,4)) = 2019 and number(substring(ExpiryTime, 6,7)) < 10 ) or (number(substring(ExpiryTime, 1,4)) = 2019 and number(substring(ExpiryTime, 6,7)) = 10 and number(substring(ExpiryTime, 9,10)) < 14 ) )]/parent::node()/String[Key= 'KPRPC JSON']/Value`

Then you would need to set `hide:false` to `true` in the JSON object  
´"{version":1,“alwaysAutoFill”:false,“neverAutoFill”:false,“alwaysAutoSubmit”:false,“neverAutoSubmit”:false,“priority”:0,“hide”:false,“blockHostnameOnlyMatch”:false,“blockDomainOnlyMatch”:false}´
