Tag Archives: apt

Day-to-Day APT Usage

APT stand for Advanced Package Tool. APT also the first system to properly handle dependencies in software. If you want to install software like Libre Office, APT downloads Libre Office package and any other software it needs to work. APT also handles installation resuming if the internet connection is lose.


APT uses a local cache of the available packages. Run the command below:

  • sudo apt update

As you can see APT will communicate with all the servers it is configured to use and download the latest list of file updates. If the list outdated, it will download the updates.

Next we can ask APT to automatically download any software that have been updated. Run the command below:

  • sudo apt upgrade

Below result the system already upgraded.

If the system is not upgrade, there will be a number of package that need to upgrade. It will show the download size of the package.

Remember, apt upgrade never removes software or adds new software!

If “0 not upgraded” status change, some things cannot be upgraded because of the update list didn’t satisfy the dependencies. In resolve this situation, we need to use apt dist-upgrade this allow to upgrade from one version of Debian/Ubuntu to a newer version.


This action is responsible for adding new software. For example, if I want to install MySQL database server. Here example command:

  • sudo apt install mysql-server

The output of the command tells:

  • All the dependencies required to install MySQL Server
  • There version that will install is MySQL-Server-8.0
  • There also suggested packages that can be install
  • Size the will be occupied on disk.

If the software/packages already installed, the apt install will be consider it as apt update and looks to see whether new versions are available for download.


The action is to remove the things that no longer want. The command as below:

  • sudo apt remove

Warning! Removing packages can be dangerous because APT also removes any software that relies on the packages that selected. Make sure to read the output carefully before proceed press Y to continue with the uninstall.

After the remove complete, the configuration files of the program is leave behind. If you reinstall, you don’t need to reconfigure it.

If want to remove the configuration file during the remove action, use below command:

  • sudo apt purge firefox

As you can see there is additional action perform by purge command. It will purging configuration files once the firefox is removed.

.::End of post::.