1. Managing software

1.1. APT

WHAT IS APT?

A packaging system simply provides programs and applications for installation.

APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.

1.1.1. Updating Package Database

Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date. Without this the system won’t know if there are newer packages available or not.

apt-get update

1.1.2. Upgrading Package Database

Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.

sudo apt-get upgrade

1.1.3. SEARCH FOR PACKAGES WITH APT

To search for a package you can use the following command:

apt search apache2

1.1.4. INSTALLING NEW PACKAGES

If you are find the name of the package you want to install, you can install it by running this command:

apt install apache2 vlc

1.1.5. REMOVING INSTALLED PACKAGES

To uninstall a package from your system, you can use the following command:

apt remove vlc
This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command:
apt purge vlc

1.1.6. clean up any unused libraries and packages

apt autoremove

This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.