def cleanVersion(version):
    """ removes CMSSW_ from the version string if it starts with it """

    prefix = "CMSSW_"

    if version.startswith(prefix):
        return version[len(prefix):]
    else:
        return version