When you logout of your account the system carries out any commands held in a "logout" file which is in your home directory.
The name of this file depends upon the type of shell you are using. The Bourne shell does not provide you with this facility.