Ubuntu application management

Ubuntu, similar to its parent distribution Debian GNU/Linux, includes a powerful and comprehensive package management system. This system is crucial for installing, upgrading, configuring, and removing software on your Ubuntu computer.

apt update and upgrade
sudo apt update # Fetches the list of available updates
sudo apt list –upgradable  # Check what is upgradeable
sudo apt upgrade # Installs some updates; does not remove packages
sudo apt full-upgrade # Installs updates; may also remove so
me packages, if needed
sudo apt autoremove # Removes any old packages that are no longer needed


sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean -y && sudo apt autoclean -y # One command to update, upgrade and clean up at the same time.

apt install and remove
sudo apt install package_name  #Install a Package
sudo apt remove package_name # Remove package
sudo apt install package_name  –reinstall  #Reinstall Application

apt list command
apt list package_name  #List all available versions from the Ubuntu repositories
apt list package_name  –installed #List all installed applications
apt list package_name* #List all available versions from the Ubuntu repositories using wildcard

apt show and list
apt show package_name # Shows details about the package
apt search package_name # Search for the package

Block certain packages from update
sudo apt-mark hold package_name # Block package from update
sudo apt-mark unhold package_name # Unblock package from update
sudo apt-mark showhold #Show which packages are on hold

Switch to HTTPS respiratory

In order to comply with security protocols, it may be necessary to change your respiratory from HTTP to HTTPS. If outbound HTTP traffic is closed, you will need to switch your respiratory to HTTPS.
The website Mirrors : Ubuntu (launchpad.net) has a list of all Ubuntu repositories, including those with HTTPS. We will use The University of Waterloo Index of /ubuntu/ (uwaterloo.ca) respiratory.

To backup the original file list, run the command:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

Then, open the file for editing:
sudo nano /etc/apt/sources.list

Remove all existing content and add the following URLs.

deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal main restricted
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-updates main restricted
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal universe
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-updates universe
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal multiverse
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-updates multiverse
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-security main restricted
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-security universe
deb https://mirror.csclub.uwaterloo.ca/ubuntu/ focal-security multiverse

Once you have updated the file, run the command:
sudo apt update

This will refresh your respiratory.

If you need to restore to the default settings, use the following command:
sudo cp /etc/apt/sources.list.backup /etc/apt/sources.list