Deleting the duplicate entries in a collection type

im using my custom build import controller, can you provide an example for your approach