Unlock rotation from script

I have a game object whose Rigidbody has rotation fixed on all axes. Is there any way for m to programmatically unlock rotation on these axes at a certain point in the game?

You need to modify the rigidbody constraints to remove the flags for freezing the individual axis rotations.

  rigidbody.constraints = RigidbodyConstraints.None;

Removes all of them.