To avoid such situations regarding uninstallation, if you use compilation from sources you can use the "prefix" option.
Example:
cmake .. \
         -D CMAKE_INSTALL_PREFIX: PATH=/opt/clamav
         ...
This way uninstalling is no longer a problem.
If you have followed the official compilation instructions, the "install_manifest.txt" file is generated in the "build" directory recommended to be created and used for this purpose.