151 lines
4.1 KiB
Bash
Executable File
151 lines
4.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Script Name: uninstall_fedora.sh
|
|
# Version : 1.0
|
|
# Description: Uninstallation script to revert customizations
|
|
# GNOME 46 Look Like macOS on Fedora 40
|
|
#
|
|
# For Linux : Fedora 40
|
|
# For Desktop Environment : GNOME Shell 46
|
|
# Author: linuxscoop
|
|
# Youtube: https://youtube.com/user/linuxscoop
|
|
# Created: May 25, 2024
|
|
# Last Modified: June 07, 2024
|
|
#
|
|
#
|
|
# # Remove installed GNOME apps and dependencies
|
|
# remove_gnome_apps() {
|
|
# clear
|
|
# echo "Removing GNOME apps and dependencies..."
|
|
# sudo dnf remove -y gnome-weather \
|
|
# gnome-maps \
|
|
# gnome-audio \
|
|
# gnome-calendar \
|
|
# gnome-clocks \
|
|
# gnome-connections \
|
|
# gnome-console \
|
|
# gnome-contacts \
|
|
# gnome-music \
|
|
# vlc \
|
|
# gnome-shell-extension-pomodoro
|
|
# }
|
|
|
|
## Uninstall WhiteSur GTK theme
|
|
uninstall_whitesur_gtk_theme() {
|
|
rm -rf $HOME/.themes/WhiteSur*
|
|
rm -rf $HOME/.config/gtk-4.0/gtk.css
|
|
}
|
|
|
|
# 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/*
|
|
}
|
|
|
|
# Remove Cava, Neofetch and their configurations
|
|
remove_cava_neofetch() {
|
|
clear
|
|
echo "Removing Cava, Neofetch and their configurations..."
|
|
sudo dnf remove -y cava neofetch
|
|
rm -rf "$HOME/.config/cava"
|
|
rm -rf "$HOME/.config/neofetch"
|
|
}
|
|
|
|
# Remove Oh My Zsh and revert to default shell
|
|
remove_zsh_oh_my_zsh() {
|
|
clear
|
|
echo "Removing Oh My Zsh..."
|
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/uninstall.sh)"
|
|
rm -r $HOME/.p10k.zsh
|
|
sudo dnf remove -y zsh
|
|
sudo chsh -s "$(which bash)" "$(whoami)"
|
|
}
|
|
|
|
remove_flatpak_apps() {
|
|
clear
|
|
echo "Uninstall Flatpak Applications.."
|
|
flatpak uninstall --delete-data io.bassi.Amberol
|
|
# Clean up any unused libraries
|
|
flatpak uninstall --unused
|
|
sudo rm -rf /var/lib/flatpak
|
|
}
|
|
|
|
# # Remove Flatpak applications and disable Flatpak support
|
|
# disable_flatpak_and_appimage_support() {
|
|
# clear
|
|
# echo "Removing Flatpak applications and disabling Flatpak support..."
|
|
# flatpak uninstall -y io.bassi.Amberol #com.mattjakeman.ExtensionManager com.github.KRTirtho.Spotube
|
|
# sudo dnf remove -y gnome-software gnome-software-plugin-flatpak flatpak fuse
|
|
# sudo flatpak remote-delete flathub
|
|
# }
|
|
|
|
# Remove Plymouth macOS theme
|
|
remove_plymouth_macos_theme() {
|
|
clear
|
|
echo "Removing Plymouth macOS theme..."
|
|
sudo plymouth-set-default-theme -R spinner
|
|
sudo rm -rf /usr/share/plymouth/themes/macOS
|
|
}
|
|
|
|
# Restore default GNOME Shell configuration
|
|
restore_default_gnome_shell_configuration() {
|
|
clear
|
|
echo "Restoring default GNOME Shell configuration..."
|
|
dconf reset -f /
|
|
}
|
|
|
|
# Prompt for confirmation to reboot the system and handle user's choice
|
|
prompt_for_reboot() {
|
|
clear
|
|
read -p "Uninstallation completed successfully. It is recommended to reboot your system for changes to take effect. Reboot now? (y/n): " choice
|
|
|
|
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
|
|
echo "Rebooting..."
|
|
sudo reboot
|
|
else
|
|
echo "Reboot skipped. Please reboot manually to apply the changes."
|
|
fi
|
|
}
|
|
|
|
# Main function to execute all steps
|
|
main() {
|
|
remove_gnome_shell_extensions
|
|
remove_whitesur_gtk_theme
|
|
remove_whitesur_icon_theme
|
|
remove_whitesur_firefox_theme
|
|
remove_cursors_theme
|
|
remove_cava_neofetch
|
|
remove_zsh_oh_my_zsh
|
|
remove_powerlevel10k_theme
|
|
remove_flatpak_apps
|
|
remove_plymouth_macos_theme
|
|
restore_default_gnome_shell_configuration
|
|
remove_fonts_and_wallpapers
|
|
prompt_for_reboot
|
|
}
|
|
|
|
# Execute the main function
|
|
main
|