loader image

Reply To: How to update Linux through the terminal, Debian based.

What makes us different from other similar websites? Forums Tech How to update Linux through the terminal, Debian based. Reply To: How to update Linux through the terminal, Debian based.

#7672
thumbtak
Moderator

You can save the following script as system-upgrade.sh if you want a script to run when you want to fully update.

#!/bin/bash

echo -e "\033[30;45mUpdating APT repository index...\033[0m"
sudo apt-get update

echo -e "\033[30;45mUpgrading existing installed packages...\033[0m"
sudo apt-get upgrade -y

echo -e "\033[30;45mPerforming distribution upgrade...\033[0m"
sudo apt-get dist-upgrade -y

echo -e "\033[30;45mRemoving unnecessary packages to save disk space...\033[0m"
sudo apt-get autoremove -y

echo -e "\033[30;45mUpgrade installed Flatpak applications\033[0m"
flatpak upgrade

echo -e "\033[30;45mRefreshing Snap...\033[0m"
sudo snap refresh

echo -e "\033[30;45mUpgrade to next Xubuntu LTS release...\033[0m"
sudo do-release-upgrade

Run the script by using the following command …

$ ./system-upgrade.sh

TAKs Shack