Implement -c option in upgrade.

Closes #644.