There is a script that generates a passwords and stores it in a variable and in a file. Then the password in the variable is used to encrypt another file. That's it! Now that is not hard to write the hard part is: Can you delete all traces? Because from what I have read the commands in the script (and the output) will be saved somewhere.
Back to the question:
~./bash_history - in the normal case - is accessible only to you and the root.. You may have a cronjob to empty this file occasionally or frequently. This could be as simple as :
#m h dom mon dow command * * * * * cat /dev/null>~./bash_history
If the above doesn't solve your problem, you can use a tool called
$ apt-cache show bleachbit
gave me :
Description-en: delete unnecessary files from the system BleachBit deletes unnecessary files to free valuable disk space, maintain privacy, and remove junk. It removes cache, Internet history, temporary files, cookies, and broken shortcuts. . It handles cleaning of Adobe Reader, Bash, Beagle, Epiphany, Firefox, Flash, GIMP, Google Earth, Java, KDE, OpenOffice.org, Opera, RealPlayer, rpmbuild, Second Life Viewer, VIM, XChat, and more. . Beyond simply erasing junk files, BleachBit wipes free disk space (to hide previously deleted files for privacy and to improve compression of images), vacuums Firefox databases (to improve performance without deleting data), and securely **shreds** arbitrary files.
Note that it handles cleaning of bash.
Do have a look at BleachBit [ features ] page.