That not clearing of the terminal commands happens due to clear no longer working. If you do some googling it turns out the culprit seems to be an XCode 4 update for me. It handily blew away some of the files in
/usr/share/terminfo/78 specifically it removed the configuration file
xterm-256color. Restoring this file from time machine or another Lion install will restore the clear command and will stop some other funkiness I was seeing in the terminal.
Or if you have pacifist and the Lion Installer application you can open the specific package and extract the file:
- Find the
Install Mac OS X Lionapplication and Right click it and choose
Show Package Contents
- Inside the package contents mount the .dmg located at
Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg
- From the disk image open
Mac OS X Install ESD/Packages/BaseSystemResources.pkgin pacifist
- In pacifist navigate to and extract the file
/usr/share/terminfo/78/xterm-256colorto the same place on your hard drive.