#!/bin/bash

purge_packages || exit 1
sudo rm -rf /usr/share/applications/monero-gui.desktop

IFS=$'\n'

#remove program files from /usr/local/bin
files='monero-blockchain-ancestry
monero-blockchain-depth
monero-blockchain-export
monero-blockchain-import
monero-blockchain-mark-spent-outputs
monero-blockchain-prune
monero-blockchain-prune-known-spent-data
monero-blockchain-stats
monero-blockchain-usage
monerod
monero-gen-ssl-cert
monero-gen-trusted-multisig
monero-wallet-cli
monero-wallet-gui
monero-wallet-rpc' #update this list with ls /tmp/monero-gui/build/release/bin | grep .

for file in $files ;do
  sudo rm -f "/usr/local/bin/$file" || exit 1
done

#remove app icons from /usr/share/icons
files='128x128.png
16x16.png
24x24.png
256x256.png
32x32.png
48x48.png
64x64.png
96x96.png' #update this list with ls /tmp/monero-gui/images/appicons | grep .

for file in $files ;do
  sudo rm -f /usr/share/icons/hicolor/$(echo "$file" | awk -F'.' '{print $1}')/apps/monero.png || exit 1
done
