Closes #35997 Closes #38018 Closes #41516 Release Notes: - Fixes stale git repositories persisting after removal