#!/usr/bin/python3
#--------------------------------------------------------------------------------------------------------
# Name: Linux Lite - Lite Driver Manager
# Architecture: amd64
# Author: Jerry Bezencon
# Website: https://www.linuxliteos.com
# Language: Python/GTK4
# Licence: GPLv2+
#--------------------------------------------------------------------------------------------------------
import os
import sys

if os.getuid() != 0:
    print("litedrivermanager-remove-live-media needs to be run as root.")
    sys.exit(1)

if os.path.exists("/media/litedrivermanager"):
    os.system("umount -q /media/litedrivermanager")
    os.system("rm -rf /media/litedrivermanager")

os.system("rm -f /etc/apt/sources.list.d/litedrivermanager.list")

print ("Live media removed from sources.")
