I uploaded files and folders to iCloud from several external drives that have some of the same files and folders. There are very are many duplicates in iCloud now. I need to conserve space in iCloud and make the iCloud files and folders quicker to scroll through, so I would like to know how to remove the duplicates once they are in iCloud.
If you have a Macintosh, you could download a duplicate file finder such as Gemini, Photos duplicate cleaner, dr. cleaner, all available on the app store. Enable the icloud folder on your mac in Finder via Preferences (file > preferences, or cmd-,) while focusing finder to enable the iCloud folder to show on your list of shortcuts.
You need to be logged into iCloud on your Mac to enable this, as well as have it checked to on in the icloud preference plane.
If your only device is an iPhone, perhaps there are the same type of apps in the app store. You can enable the iCloud shortcut to view your files just like on the Mac as well. But other than these options, you may need to do it manually.