Some programs provide an uninstall or clean target in their Makefile. Try running:
cd /path/to/source/directory
sudo make uninstall
Identify the binary files that were installed.
Typically, these are located in /usr/local/bin. You can use the rm command to remove them:
sudo rm /usr/local/bin/binary_file
Check for other installed files, such as libraries, headers, or documentation. Remove them manually using the rm command or by deleting the corresponding directories:
sudo rm -rf /usr/local/lib/program_name
sudo rm -rf /usr/local/include/program_name
If you removed libraries, update the shared libraries cache:
sudo ldconfig
Remove any remaining configuration files or directories:
sudo rm -rf /etc/program_name
In addition:
sudo apt autoremove
sudo apt clean
If you can sudo without restrictions, you can simply delete the program from wherever it is residing. More information here: https://stackoverflow.com/a/1439989
Short: try
sudo make uninstall
and if that doesn't work:make -n install
and reverse all the steps.Or just delete the binary in /usr/local/bin without bothering about the rest.