This needs to be more fine-grained. For GitHub refs to not be broken you should first check if the specific entry is specified as a version or a GitHub reference and not delete if it's the latter.