[enh] cleanup upgrade script