How to do a Kam reset

How do you do a kam reset without using forscan? I know you can disconnect the battery for 30mins , but does that actually work and reset driving habits etc?