Delete userdefined fields

Help
Anonymous
2013-07-22
2013-08-12
  • Anonymous - 2013-07-22

    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.

     
  • Paul

    Paul - 2013-07-22

    No, KeePass doesn't do bulk edits. Even if it did, how would you confirm all fields of that name are empty?

    cheers, Paul

     
  • wellread1

    wellread1 - 2013-07-22

    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:

    1. Display user defined String Field in View:
      • View>Configure columns...
      • Check the Custom Field you wish to remove
    2. Display all records:
      • View>Grouping in Entry List>Off
      • View>Check "Show Entries in Subgroups"
      • Select the root Group to display all entries.
    3. Sort the user defined String in the View in descending order by clicking on its Column header (there are three possile sort orders: ascending, descending, unsorted). Make sure that the View window is displaying the top entries(i.e. the view scroll bar on the right is all the way at the top).
    4. The entries containing user defined String Field values will be listed at the top of the list. Manually edit each entry and delete the String Field.

    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:

    <String>
        <Key>Email Address</Key>
        <Value />
    </String>
    

    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.

     
    Last edit: wellread1 2013-07-22
  • wellread1

    wellread1 - 2013-07-22

    A Find dialog (Ctrl-F) option to search in "String Field names" could be useful to those wishing to tidy up their database.

     
  • AlexVallat

    AlexVallat - 2013-07-22

    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.

    Alex

     
  • OLLI_S

    OLLI_S - 2013-08-11

    Hello,

    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:
    "(id|index)":[0-9]*,

    But here it really would be useful to delete unwanted data (that is imported) out of KeePass (by searching and deleting it).

    Greetings

    OLLI

     
  • Paul

    Paul - 2013-08-12

    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.

    cheers, Paul

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks