You can look for the Site Recovery Wizard interface either on the start menu or on the ISO. It can try to repair the site or uninstall the old site. See this article for reference:
How to Recover Restore SCCM Primary Site Server Database Part 1 ConfigMgr Endpoint Manager
Otherwise, there is probably some leftover information in the registry and/or Program Files folder from the old install. Can try checking these locations (or similar):
SCCM File and Registry Locations
As a last resort, install on a different server or reinstall the OS to clear it. The only other place SCCM stores information not on its local server or in its database is in the AD container for "System Management."
Please upvote and accept this thread as answered if it's helpful, thanks!