#!/usr/bin/env bash

# omarchy:summary=Remove RetroArch, all libretro cores, and its config/saves. Leaves ~/Games/roms and ~/Games/bios alone.
# omarchy:requires-sudo=true

set -e

# Based: the Debian packages omarchy-install-gaming-retroarch installs.
omarchy-pkg-drop \
  retroarch retroarch-assets \
  libretro-core-info \
  libretro-beetle-vb libretro-beetle-wswan \
  libretro-bsnes-mercury-accuracy libretro-bsnes-mercury-balanced libretro-bsnes-mercury-performance \
  libretro-desmume libretro-gambatte libretro-genesisplusgx libretro-mgba libretro-nestopia libretro-snes9x

rm -rf \
  "$HOME/.config/retroarch" \
  "$HOME/.local/share/retroarch" \
  "$HOME/.cache/retroarch"

echo ""
echo "RetroArch and its cores have been removed."
echo "ROMs and BIOS files at ~/Games/roms and ~/Games/bios were left in place."
