http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/#
Pretty good writeup for activation and deactivation
Same thing is here on SE
Theme Activate Hook
http://www.krishnakantsharma.com/2011/01/activationdeactivation-hook-for-wordpress-theme/#
Pretty good writeup for activation and deactivation
Same thing is here on SE
Theme Activate Hook