Ubuntu 8.04 comes with KTorrent 2.2.5, which includes by default several plugins among which is the Search plugin, for finding torrents on various sites. In order to clear the search history, you will only have to delete the file ~/.kde/share/apps/ktorrent/search_history, where ~ is your home directory. For example, either type in a terminal application:
Or use a file manager like Konqueror, make sure to have viewing hidden files enabled and delete it this way. You'll have to restart KTorrent for changes to be visible.
Updated: Sep 16, 2008