code: def remove_old_releases(version, repo_root):
      if confirm_action(
          "In beta release we do not remove old RCs. Is this a beta release?"
      ):
          return
      if not confirm_action(
          "Do you want to look for old RCs to remove?"
      ):
          return
  
      os.chdir(f"{repo_root}/asf-dist/dev/airflow")
  
      old_releases = []
      for entry in os.scandir():
          if entry.name == version:
              # Don't remove the current RC
              continue
          if entry.is_dir() and entry.name.startswith("2."):
              old_releases.append(entry.name)
      old_releases.sort()
  
      for old_release in old_releases:
          if confirm_action(f"Remove old RC {old_release}?"):
              run_command(
                  ["svn", "rm", old_release],
                  dry_run_override=DRY_RUN,
                  check=True,
              )
              run_command(
                  [
                      "svn",
                      "commit",
                      "-m",
                      f"Remove old release: {old_release}",
                  ],
                  dry_run_override=DRY_RUN,
                  check=True,
              )
      console_print("[success]Old releases removed")
      os.chdir(repo_root)
  
imports: from __future__ import annotations
  import os
  import shutil
  import click
  from airflow_breeze.commands.common_options import option_answer
  from airflow_breeze.commands.release_management_group import release_management
  from airflow_breeze.utils.confirm import confirm_action
  from airflow_breeze.utils.console import console_print
  from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT
  from airflow_breeze.utils.reproducible import archive_deterministically, get_source_date_epoch
  from airflow_breeze.utils.run_utils import run_command
label_desc: Use image node_id 17 for calling a global function with example usage: remove_old_releases(version, repo_root) without return types