Hello. Is there a way to delete userdefined fields from the database? I have added some fields for testing purpose, but at this time, no entry use sone of this fields. But it seems, that they are axist in my database anyway. It would be cool to a) have a way to find entrys that belong to userdefined field x and b) to delete unused userdefined fields.
No, KeePass doesn't do bulk edits. Even if it did, how would you confirm all fields of that name are empty?
A user defined String Field will not be listed in the "Name:" list of the Edit Entry String dialog once it no longer exists in any entry. There is no automatic way to find and remove a String Field from every entry containing it. However, there are some manual methods that are somewhat more efficient than editing every entry in the database via the Edit Entry dialog.
If the un-needed user defined String Fields contain values, you can find entries and delete the String fields:
The method above will not find entries containing empty user defined String Fields. To do that you must export your database as a XML file. Then, using a text editor, find all entries containing empty user defined String Fields, and delete the entire String Field element. For example if the user defined String Field name is "Email Address", find & delete all instances of:
Then, import the edited XML file into a new, empty database. Editing the an XML file should be done with due care, improper edits could lead to unexpected outcomes on import.
A Find dialog (Ctrl-F) option to search in "String Field names" could be useful to those wishing to tidy up their database.
As an alternative to the XML export/import method, you might also like to consider using the KPEnhancedEntryView plugin.
If you have "Show Entries of Subgroups" checked in the "View" menu then select the root group (as in the above instructions), with KPEnhancedEntryView installed you can then just select all the entries ("Edit" menu, then "Select All" is probably the easiest way), and the entry view will show all the fields that are on any of selected entries, even if they are blank. You can then right click on any of them and choose Delete Field.
I imported my bookmarks (about 2500 entries) form Mozilla Firefox (via a JSON file).
Now most of the entries have the user-defined field "ID" and some of them have the additional field "Index".
Both contain numbers and are useless for for me.
It would be cool if I could delete these fields in all entries (by searching for user-defined fields and deleting them).
Dominik sent me a Reg-Ex expression to delete those fields in the source JSON:
But here it really would be useful to delete unwanted data (that is imported) out of KeePass (by searching and deleting it).
You can search in KeePass but it won't find random data. You would need to export the data to XML and then search / replace.
Bulk edits are potentially dangerous as you could delete data without realising and KeePass is the last place you want that to happen.