If you have duplicates in the database it's because the files are present in the hidden recycle/trash folders. To remove them completely you can use the disktidy tool in rockbox or delete the files by connecting the iPod to your computer and deleting that way.
It's in the FAQ here:
I deleted the files off my player's drive but they're still showing up in the Database, what gives?
There are several reasons why this might be happening.
"Your operating system is configured to save deleted files in a trash/recycle folder, thus allowing the database scan to still find them. You can reconfigure your OS to no longer do this, use the Disk Tidy plugin to remove them, simply delete the extra files manually through the file browser, or remove them while connected to your PC. These directories are often "hidden" so you may need to fiddle with your system settings in order to see them. Updating your database once the files have truly been deleted should resolve this issue.
You have Auto Update set to on, but Directory Cache is still inactive. If you wish the Auto Update feature to remove old files as well as add new ones, the Directory Cache feature must also be enabled."