├── menu.png ├── screenshot.png ├── LICENSE ├── README.md └── ubuntu-debullshit.sh /menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polhdez/ubuntu-debullshit/HEAD/menu.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polhdez/ubuntu-debullshit/HEAD/screenshot.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ubuntu-debullshit! 2 | 3 | #### An automated script to set-up Ubuntu as it should be. Tested on Ubuntu 22.04, 23.04, 24.04 and 25.04. 4 | 5 | 6 | 7 | #### Features: 8 | 9 | * Removes snaps completely 10 | * Installs a vanilla gnome session 11 | * Sets up flathub and gnome-software with the flatpak plugin 12 | * Installs gnome-tweaks 13 | * Installs [Extension Manager](https://github.com/mjakeman/extension-manager) 14 | * Disables the Ubuntu theming 15 | * Enables the libadwaita theme in gtk3 apps using [adw-gtk3](https://github.com/lassekongo83/adw-gtk3). 16 | * Installs the [MoreWaita](https://github.com/somepaulo/MoreWaita) icon theme for extended icon support. 17 | * Enables Gnome integration with QT apps 18 | * Installs Firefox from the Mozilla Repository 19 | * Disables the data reporting component 20 | * Disables the annoying crash popup 21 | * Removes terminal ads 22 | 23 | TL;DR, you will end up with a clean GNOME desktop with flatpaks, similar to a fresh Fedora install. 24 | 25 | #### Preview 26 | 27 | 28 | 29 | #### Installation 30 | 31 | I recommend a minimal install of Ubuntu to run this. 32 | 33 | You can download the script from the repo or use this oneliner command, there are no dependencies required. 34 | 35 | `sudo bash -c "$(wget -qO- https://raw.githubusercontent.com/polkaulfield/ubuntu-debullshit/main/ubuntu-debullshit.sh)"` 36 | 37 | After the install, reboot and enjoy a clean experience :) 38 | 39 | Buy Me a Coffee at ko-fi.com 40 | -------------------------------------------------------------------------------- /ubuntu-debullshit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | disable_ubuntu_report() { 4 | ubuntu-report send no 5 | apt remove ubuntu-report -y 6 | } 7 | 8 | remove_appcrash_popup() { 9 | apt remove apport apport-gtk -y 10 | } 11 | 12 | remove_snaps() { 13 | while [ "$(snap list | wc -l)" -gt 0 ]; do 14 | for snap in $(snap list | tail -n +2 | cut -d ' ' -f 1); do 15 | snap remove --purge "$snap" 2> /dev/null 16 | done 17 | done 18 | 19 | systemctl stop snapd 20 | systemctl disable snapd 21 | systemctl mask snapd 22 | apt purge snapd -y 23 | rm -rf /snap /var/lib/snapd 24 | for userpath in /home/*; do 25 | rm -rf $userpath/snap 26 | done 27 | cat <<-EOF | tee /etc/apt/preferences.d/nosnap.pref 28 | Package: snapd 29 | Pin: release a=* 30 | Pin-Priority: -10 31 | EOF 32 | } 33 | 34 | disable_terminal_ads() { 35 | sed -i 's/ENABLED=1/ENABLED=0/g' /etc/default/motd-news 2>/dev/null 36 | pro config set apt_news=false 37 | } 38 | 39 | update_system() { 40 | apt update && apt upgrade -y 41 | } 42 | 43 | cleanup() { 44 | apt autoremove -y 45 | } 46 | 47 | setup_flathub() { 48 | apt install flatpak -y 49 | flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo 50 | apt install --install-suggests gnome-software -y 51 | } 52 | 53 | gsettings_wrapper() { 54 | if ! command -v dbus-launch; then 55 | sudo apt install dbus-x11 -y 56 | fi 57 | sudo -Hu $(logname) dbus-launch gsettings "$@" 58 | } 59 | 60 | set_fonts() { 61 | gsettings_wrapper set org.gnome.desktop.interface monospace-font-name "Monospace 10" 62 | } 63 | 64 | setup_vanilla_gnome() { 65 | apt install qgnomeplatform-qt5 -y 66 | apt install qgnomeplatform-qt6 -y 67 | apt install gnome-session fonts-cantarell adwaita-icon-theme gnome-backgrounds gnome-tweaks vanilla-gnome-default-settings gnome-shell-extension-manager -y && apt remove ubuntu-session yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound -y 68 | set_fonts 69 | restore_background 70 | } 71 | 72 | restore_background() { 73 | gsettings_wrapper set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/gnome/blobs-l.svg' 74 | gsettings_wrapper set org.gnome.desktop.background picture-uri-dark 'file:///usr/share/backgrounds/gnome/blobs-l.svg' 75 | } 76 | 77 | install_adwgtk3() { 78 | wget -O /tmp/adw-gtk3.tar.xz https://github.com/lassekongo83/adw-gtk3/releases/download/v5.10/adw-gtk3v5.10.tar.xz 79 | tar -xf /tmp/adw-gtk3.tar.xz -C /usr/share/themes/ 80 | if command -v flatpak; then 81 | flatpak install -y runtime/org.gtk.Gtk3theme.adw-gtk3-dark 82 | flatpak install -y runtime/org.gtk.Gtk3theme.adw-gtk3 83 | fi 84 | if [ "$(gsettings_wrapper get org.gnome.desktop.interface color-scheme | tail -n 1)" == ''\''prefer-dark'\''' ]; then 85 | gsettings_wrapper set org.gnome.desktop.interface gtk-theme adw-gtk3-dark 86 | gsettings_wrapper set org.gnome.desktop.interface color-scheme prefer-dark 87 | else 88 | gsettings_wrapper set org.gnome.desktop.interface gtk-theme adw-gtk3 89 | fi 90 | } 91 | 92 | install_icons() { 93 | apt install adwaita-icon-theme -y 94 | apt install git -y 95 | git clone https://github.com/somepaulo/MoreWaita.git /tmp/MoreWaita 96 | /tmp/MoreWaita/install.sh 97 | apt install adwaita-icon-theme -y 98 | gsettings_wrapper set org.gnome.desktop.interface icon-theme MoreWaita 99 | gsettings_wrapper set org.gnome.desktop.interface accent-color blue 100 | } 101 | 102 | restore_firefox() { 103 | wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- > /etc/apt/keyrings/packages.mozilla.org.asc 104 | echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" > /etc/apt/sources.list.d/mozilla.list 105 | echo ' 106 | Package: * 107 | Pin: origin packages.mozilla.org 108 | Pin-Priority: 1000 109 | ' > /etc/apt/preferences.d/mozilla 110 | apt update 111 | apt install firefox -y 112 | } 113 | 114 | ask_reboot() { 115 | echo 'Reboot now? (y/n)' 116 | while true; do 117 | read choice 118 | if [[ "$choice" == 'y' || "$choice" == 'Y' ]]; then 119 | reboot 120 | exit 0 121 | fi 122 | if [[ "$choice" == 'n' || "$choice" == 'N' ]]; then 123 | break 124 | fi 125 | done 126 | } 127 | 128 | msg() { 129 | tput setaf 2 130 | echo "[*] $1" 131 | tput sgr0 132 | } 133 | 134 | error_msg() { 135 | tput setaf 1 136 | echo "[!] $1" 137 | tput sgr0 138 | } 139 | 140 | check_root_user() { 141 | if [ "$(id -u)" != 0 ]; then 142 | echo 'Please run the script as root!' 143 | echo 'We need to do administrative tasks' 144 | exit 145 | fi 146 | } 147 | 148 | enable_appindicator() { 149 | gsettings_wrapper set org.gnome.shell enabled-extensions "['ubuntu-appindicators@ubuntu.com']" 150 | } 151 | 152 | print_banner() { 153 | echo ' 154 | ▐ ▗ ▐ ▐ ▝▜ ▝▜ ▐ ▝ ▗ ▗ 155 | ▗ ▗ ▐▄▖ ▗ ▗ ▗▗▖ ▗▟▄ ▗ ▗ ▄▟ ▄▖ ▐▄▖ ▗ ▗ ▐ ▐ ▄▖ ▐▗▖ ▗▄ ▗▟▄ ▐ 156 | ▐ ▐ ▐▘▜ ▐ ▐ ▐▘▐ ▐ ▐ ▐ ▐▘▜ ▐▘▐ ▐▘▜ ▐ ▐ ▐ ▐ ▐ ▝ ▐▘▐ ▐ ▐ ▐ 157 | ▐ ▐ ▐ ▐ ▐ ▐ ▐ ▐ ▐ ▐ ▐ ▀▘ ▐ ▐ ▐▀▀ ▐ ▐ ▐ ▐ ▐ ▐ ▀▚ ▐ ▐ ▐ ▐ ▝ 158 | ▝▄▜ ▐▙▛ ▝▄▜ ▐ ▐ ▝▄ ▝▄▜ ▝▙█ ▝▙▞ ▐▙▛ ▝▄▜ ▝▄ ▝▄ ▝▄▞ ▐ ▐ ▗▟▄ ▝▄ ▐ 159 | 160 | By @polkaulfield 161 | ' 162 | } 163 | 164 | show_menu() { 165 | echo 'Choose what to do: ' 166 | echo '1 - Apply everything (RECOMMENDED)' 167 | echo '2 - Disable Ubuntu report' 168 | echo '3 - Remove app crash popup' 169 | echo '4 - Remove snaps and snapd' 170 | echo '5 - Disable terminal ads (LTS versions)' 171 | echo '6 - Install flathub and gnome-software' 172 | echo '7 - Install firefox from the Mozilla repo' 173 | echo '8 - Install vanilla GNOME session' 174 | echo '9 - Install adw-gtk3 and morewaita' 175 | echo 'q - Exit' 176 | echo 177 | } 178 | 179 | main() { 180 | check_root_user 181 | while true; do 182 | print_banner 183 | show_menu 184 | read -p 'Enter your choice: ' choice 185 | case $choice in 186 | 1) 187 | auto 188 | msg 'Done!' 189 | ask_reboot 190 | ;; 191 | 2) 192 | disable_ubuntu_report 193 | msg 'Done!' 194 | ;; 195 | 3) 196 | remove_appcrash_popup 197 | msg 'Done!' 198 | ;; 199 | 4) 200 | remove_snaps 201 | msg 'Done!' 202 | ask_reboot 203 | ;; 204 | 5) 205 | disable_terminal_ads 206 | msg 'Done!' 207 | ;; 208 | 6) 209 | update_system 210 | setup_flathub 211 | msg 'Done!' 212 | ask_reboot 213 | ;; 214 | 7) 215 | restore_firefox 216 | msg 'Done!' 217 | ;; 218 | 8) 219 | update_system 220 | setup_vanilla_gnome 221 | enable_appindicator 222 | msg 'Done!' 223 | ask_reboot 224 | ;; 225 | 226 | 9) 227 | update_system 228 | install_adwgtk3 229 | install_icons 230 | msg 'Done!' 231 | ask_reboot 232 | ;; 233 | 234 | q) 235 | exit 0 236 | ;; 237 | 238 | *) 239 | error_msg 'Wrong input!' 240 | ;; 241 | esac 242 | done 243 | 244 | } 245 | 246 | auto() { 247 | msg 'Updating system' 248 | update_system 249 | msg 'Disabling ubuntu report' 250 | disable_ubuntu_report 251 | msg 'Removing annoying appcrash popup' 252 | remove_appcrash_popup 253 | msg 'Removing terminal ads (if they are enabled)' 254 | disable_terminal_ads 255 | msg 'Deleting everything snap related' 256 | remove_snaps 257 | msg 'Setting up flathub' 258 | setup_flathub 259 | msg 'Restoring Firefox from mozilla repository' 260 | restore_firefox 261 | msg 'Installing vanilla Gnome session' 262 | setup_vanilla_gnome 263 | enable_appindicator 264 | msg 'Install adw-gtk3' 265 | install_adwgtk3 266 | msg 'Installing MoreWaita icons' 267 | install_icons 268 | msg 'Cleaning up' 269 | cleanup 270 | } 271 | 272 | (return 2> /dev/null) || main 273 | --------------------------------------------------------------------------------