diff --git a/ubuntu.sh b/ubuntu.sh index ad0e671..7b2c2ec 100644 --- a/ubuntu.sh +++ b/ubuntu.sh @@ -8,8 +8,8 @@ then which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed which wget &> /dev/null || sudo apt install wget -y # install wget if not already installed - # === Upgrade and clean already installed packages == - sudo apt full-upgrade -y + # === Upgrade packages == + sudo apt upgrade -y # === Basic dev == sudo apt install build-essential valgrind -y @@ -76,7 +76,7 @@ then fish -c "abbr - 'cd -'" fish -c "abbr cat 'batcat'" fish -c "abbr nano 'micro'" - fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && sudo snap refresh && tldr --update'" + fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh && tldr --update'" fish -c "abbr d 'nautilus . -w &> /dev/null & disown'" fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'" # Remove fish icon diff --git a/wsl.sh b/wsl.sh index d38b6f4..39187d0 100644 --- a/wsl.sh +++ b/wsl.sh @@ -6,7 +6,8 @@ then sudo sed -i "s/focal/impish/g" /etc/apt/sources.list sudo sed -i "s/focal/impish/g" /etc/apt/sources.list.d/*.list sudo apt update - sudo apt full-upgrade -y + sudo apt upgrade -y + sudo apt purge needrestart # remove kernel update message (https://github.com/microsoft/WSL/issues/7054#issuecomment-864271333) which git &> /dev/null || sudo apt install git -y # install git if not already installed which curl &> /dev/null || sudo apt install apt-transport-https curl -y # install curl (along with apt-transport-https) if not already installed @@ -79,7 +80,7 @@ then fish -c "abbr - 'cd -'" fish -c "abbr cat 'batcat'" fish -c "abbr nano 'micro'" - fish -c "abbr bigupdate 'sudo apt update && sudo apt full-upgrade -y && tldr --update'" + fish -c "abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && tldr --update'" fish -c "abbr d 'explorer.exe .'" # === GL4D == @@ -155,10 +156,13 @@ then # === Remove SU password == sudo sed -i "26s#.*#%sudo ALL=(ALL:ALL) NOPASSWD: ALL#" /etc/sudoers + # === Clear useless packages + sudo apt autoremove -y - echo -e "\nInstallation terminée.\nIl faut redémarrer WSL (dans Powershell : wsl -t Debian)." + + echo -e "\nInstallation terminée.\nIl faut redémarrer WSL (dans Powershell : wsl -t Ubuntu)." echo -e "---\nPense bien à paramétrer ton terminal, exemple avec Windows Terminal :" - printf "%s\n%s%s%s\n" "Ligne de commande : wsl.exe -d Debian fish" "Répertoire de démarrage : \\" "\wsl.localhost\Debian\home\\" "$USER" + printf "%s\n%s%s%s\n" "Ligne de commande : wsl.exe -d Debian fish" "Répertoire de démarrage (si besoin): \\" "\wsl.localhost\Ubuntu\home\\" "$USER" echo "Jeu de couleur : One Half Dark" else echo "Ce script ne fonctionne que sur WSL (Debian)."