Yeah, just install the correct version of BerkeleyDB utilities. Then do a backup, modify/delete the unnecessary lines from the backup file (which is a text file) and restore back.
Please remember to create DB_CONFIG file with "set_lg_dir database" in the appropriate directory.
Detail were discussed several time on this site, at least a year ago.
Thanks, but I'm stuck at this, I manage to open wallet.dat and print it out in a format that appears to be too hard to see what I should delete. I don't fully understand the system so I don't even know how I open the database correctly and dump/import correctly.
I only see giberish like ‰¼E W•r in the text file that the backup creates.
EDIT: I can can do a proper text filel with db_dump, but I can still not see table names or anything like that.