Well this is a bit experimental, since I haven't seen the bug. But the best we can do is test it, right? :) It won't delete anything without the --delete command, and can be run on a single character at a time. With regards to this: DM Eddie said: The problem with that is that the actual bug has something to do with spin ups of sessions from idle or is trully random. I have a table that plays every saturday night and because we all login multiple times during the week, on saturday everyone has like 4-5 duplicates and only 1 set is true. When they are spell attacks, if you delete the wrong ones, the spells on the spells tab break and you have to re-input them. So basically the routine is that you test each one and delete the ones that don't spit anything out when you press them. Unless your script tests this, we have to do it manually, atleast for casters. Attributes are almost always in order of creation, it takes some tinkering to whack them out of order. So the script *should* get the right ones. Having said that, I'd 100% recommend testing it on a copy of a problem character sheet first. The script searches first the 'name' (or spellname/itemname etc.) attribute in a section. Anything after the oldest row will be flagged as a dupe. It then searches a second attribute for that row to check the match, unless you use the --single flag. Usage is this: !fixDupe --all process all character sheets --pcs process all PC sheets --char <charId or charName> process a single sheet by ID or by name (case-insensitive) followed by flags: --report report result in chat --delete delete duplicate rows --single duplicates only require a name match, not a secondary attribute match So a typical trial run would be: !fixdupe --char @{selected|character_id} --report This would hopefully show up the names of any sections/rows where a duplicate entry is found. It's pretty dumb reporting, I didn't put much effort into it. Followed by... !fixdupe --char @{selected|character_id} --report --delete Which will delete those rows, and report how many it deleted. If you run it without flags, it won't delete or report anything - it at least needs the --report flag to do anything obvious. Nothing will be modified until you supply the --delete flag. Obviously, be vary wary of using --all --delete . While the script will never delete the first instance of a row, it's possible players have duplicate entries (maybe different stacks of arrows, though they would need identical quantities to be flagged) or some other setup where a player might lose valid items. Running it without --delete first will show the names of all items/attacks/spells that have been flagged. The script can easily be modified to check different attributes, or skip sections (maybe attack?) if you don't want them checked. Script on pastebin This definitely needs some testing before I could flag it as an actual fix - I haven't been able to reproduce the bug myself, so I could only test it on manually duped rows. It's possible that the bug isn't properly reproducing the rows on firebase, in that case this script won't even pick them up, and it's back to the drawing board!