To safely remove duplicates from an SD card, first connect it to your computer. Before deleting anything, copy important files to your computer as a backup.
If there are only a few files, sort them by name or size to find duplicates. For many files, it's easier to use a duplicate file finder like SysInfo Duplicate File Finder. It can scan the SD card and show duplicate and original files separately.