I know On Star on the newer model GPs is integrated into the Radio controls, so I am not sure if you could just unplug it without some kind of ramifications. As far as a "delete code?" I think your dealer would be the only ones to know such a thing if it exits. Just a thought on that.
On my 03 it had the OnStar, but I never used it and now that the old analog is no longer being used, I am gonna see how to go about removing the box from the trunk.