I have old Software Center history and I would like to clear it all.
sudo rm -rf /var/log/apt/history.log /var/log/dpkg.log
but it did not work.
You were close—Software Center just keeps a cache of the APT history in your home folder. If you need to wipe it:
Delete the APT history log,
/var/log/apt/history.log*. (Don't forget the rotated log files.)
Delete the Software Center's pickled cache,
~/.cache/software-center/apthistory.p, from every user's home folder.
I'm not sure why your question was down-voted.