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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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.