Hi anonymous usertuardo-7580,
> Or, if it is not possible. Can I safely uninstall SQL Server 2017 completely and then copy all MDF and LDF files to the new DATA folder to have all databases in the new instance?
Yes, it is possible. Migrate SQL server 2017 to a new instance, then cleanly uninstall old SQL server 2017. You can backup all the databases and copy the full backups to the target and restore them there. Or detach the databases from the source and attach them to the target.
Refer to the blog A Faster Way to Migrate SQL Server Instances to get more.