You can check the dpkg log files to see which packages you installed recently:|
grep 'install ' /var/log/dpkg.log
and if there are older (numbered) log files, you can search these as well, like:
grep 'install ' /var/log/dpkg.log.1
It's not really necessary to clean the log files, as they should be rotated and deleted automatically at some point. But if you still want to purge them, say for privacy concerns, you can just truncate them to the size of 0 bytes:
truncate --size=0 /var/log/syslog
(You can also delete them all, but I once had permission issues that prevented them from being recreated so I prefer to truncate the main log files instead of deleting them).