#!/bin/bash # # Script Name: uninstall_ubuntu24.04.sh # Version : 1.0 # Description: Uninstallation script for reverting the changes made by install_ubuntu24.04.sh # GNOME 46 Look Like macOS on Ubuntu 24.04 # # For Linux : Ubuntu 24.04 # For Desktop Environment : GNOME Shell 46 # Author: linuxscoop # Youtube: https://youtube.com/user/linuxscoop # Created: May 25, 2024 # Last Modified: June 07, 2024 # # Remove Firefox installed from Mozilla PPA and its configurations remove_firefox_from_mozilla_ppa() { sudo apt remove --purge -y firefox sudo rm /etc/apt/apt.conf.d/51unattended-upgrades-firefox sudo rm /etc/apt/preferences.d/mozillateamppa sudo add-apt-repository --remove ppa:mozillateam/ppa -y } # Reinstall snap and common snap apps reinstall_snap_and_apps() { clear echo "Reinstalling snap and common snap apps..." sudo rm /etc/apt/preferences.d/nosnap.pref sudo apt update sudo apt install snapd -y sudo snap install core22 sudo snap install firefox sudo snap install snap-store sudo snap install gnome-42-2204 sudo snap install gtk-common-themes sudo snap install snapd-desktop-integration sudo snap install firmware-updater } # Uninstall GNOME Apps and Dependencies uninstall_gnome_apps() { sudo apt remove --purge -y gnome-weather \ gnome-maps \ gnome-audio \ gnome-calendar \ gnome-clocks \ gnome-connections \ gnome-console \ gnome-contacts \ gnome-music \ vlc \ gnome-shell-pomodoro } # Uninstall WhiteSur GTK theme uninstall_whitesur_gtk_theme() { rm -rf $HOME/.themes/WhiteSur* rm -rf $HOME/.config/gtk-4.0/*.* } # Uninstall WhiteSur icon theme uninstall_whitesur_icon_theme() { rm -rf $HOME/.icons/WhiteSur* } # Uninstall WhiteSur Firefox Theme uninstall_whitesur_firefox_theme() { cd src/WhiteSur-gtk-theme ./install.sh -r cd ../../ } # Remove Cursors theme remove_cursors_theme() { rm -rf $HOME/.icons/WhiteSur-cursors } # Remove Fonts and Wallpapers remove_fonts_and_wallpapers() { rm -rf $HOME/.local/share/fonts/* sudo rm -rf /usr/share/backgrounds/macosw } # Remove GNOME Shell Extensions remove_gnome_shell_extensions() { rm -rf $HOME/.local/share/gnome-shell/extensions/* } # Uninstall Cava, Neofetch and their configurations uninstall_cava_neofetch() { sudo apt remove --no-install-recommends neofetch cava -y rm -rf $HOME/.config/cava rm -rf $HOME//.config/neofetch } # Remove Oh My Zsh and revert to bash uninstall_zsh_oh_my_zsh() { sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh)" rm -r $HOME/.p10k.zsh sudo apt remove --no-install-recommends zsh -y sudo chsh -s /bin/bash "$USER" } remove_flatpak_apps() { clear echo "Uninstall Flatpak Applications.." flatpak uninstall --delete-data io.bassi.Amberol # Clean up any unused libraries flatpak uninstall --unused } # Disable Flatpak, Appimage Support and remove Flathub Repository disable_flatpak_and_appimage_support() { sudo apt remove --purge -y gnome-software-plugin-flatpak flatpak libfuse2 sudo rm -rf /var/lib/flatpak } # Uninstall Plymouth macOS theme uninstall_plymouth_macos_theme() { sudo rm -rf /usr/share/plymouth/themes/macOS sudo update-alternatives --remove default.plymouth /usr/share/plymouth/themes/macOS/macOS.plymouth sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/bgrt/bgrt.plymouth 110 sudo update-alternatives --config default.plymouth sudo update-initramfs -u } # Restore GNOME Shell Configuration to default restore_default_gnome_shell_configuration() { dconf reset -f / } # Clean up cleanup() { sudo apt autoremove -y sudo apt clean } # Execute all uninstallation steps reinstall_snap_and_apps remove_firefox_from_mozilla_ppa uninstall_apps_and_dependencies uninstall_whitesur_gtk_theme uninstall_whitesur_icon_theme uninstall_whitesur_firefox_theme remove_cursors_theme remove_gnome_shell_extensions uninstall_cava_neofetch uninstall_zsh_oh_my_zsh uninstall_powerlevel10k_theme disable_flatpak_and_appimage_support uninstall_plymouth_macos_theme remove_fonts_and_wallpapers restore_default_gnome_shell_configuration cleanup clear echo "Uninstallation completed successfully. Please logout and log back in for changes to take effect." read -p "Do you want to logout now? (y/n): " choice if [[ "$choice" == "y" ]]; then gnome-session-quit --logout echo "Logging out. Please log back in for changes to take effect." else echo "No changes made. You can manually logout and log back in later." fi