In case of errors like this you only have to get rid of old ppu files, but only Lazarus, not fpc. (very rarely an old pas file, if it got moved to a new location (then you have a duplicate).
The easiest way, is to go to the Tools menu, configure build lazarus, and choose "clean all" and rebuild.
Or you can uninstall the previous version / Same as deleting the installation dir.
You do NOT need to delete your config.
But if you installed as root/admin, and did builds as user, then you there may be a folder with ppu files in your config dir, and that folder may need to be deleted. But all xml files in the conf dir can be kept.
Ideally the installer (at least on windows) could detect such old ppu, and remove them. But that requires some special tools for the installer build process... And some one need to write them, and adapt the process. I can give some hints/ideas if someone wants to try it (you have to get to understand the current installer build process too.)