An Introduction To The Apt Package Manager

Search for a command to run...

No comments yet. Be the first to comment.
FYI: This is experimental and may not work on your system.

Hey all! I made this guide after getting Starship successfully working on Bash, but zsh would refuse to accept the init script. Step 0 - Set a custom password This step is not required if you've already set a custom password for your Crostini contain...

If you've ever coded for an Arduino, you're probably familiar with the Arduino IDE. Is your IDE just not uploading your sketch? Are you getting an error such as this? If so, the fix is quite simple. First, locate the Tools section on the top bar of ...

Hey all! This is a quick one, but I use command aliases all the time and they make my life so much easier when I'm in the terminal. Let's get started! 1. Opening the .bashrc file The .bashrc file is short for "bash run commands". It can be located in...

GitHub CLI is a wonderful new tool released by GitHub in an effort to bring GitHub to the terminal. In this tutorial, I will be showing you how to setup, install and use some basic features of GitHub CLI. Installation Because of the amount of install...

What is Apt? Apt is the default package manager on Ubuntu, a Linux distribution based on the popular Linux operating system, Debian. In this article we will be going over a couple basic features of Apt in order to give you, the user, a basic ability to install, uninstall and update packages.
Installing a package with Apt is pretty straightforward. First, you need the package name. Let’s use “sl” as an example. sl is a small Linux package that prints a moving steam locomotive across the screen when you type “sl” in the terminal. One thing to always remember. In most cases, unless you are logged in as “root”, you will need to type “sudo” before such a command, because it requires administrator privileges. With this information, to install a package, you need to type the following command:
sudo apt install sl
It should output something similar to this:
(Image on original post)
If it asks you if you wish to continue, press Y on your keyboard. Otherwise, if the output is similar to this, congratulations! You’ve successfully installed your first package with Apt! Type “sl” and press Enter to watch the steam locomotive go by. Choo choo!
Tip
Install multiple packages at once by adding a space between each package name.
Uninstalling packages is just as easy as installing them. Instead of “install”, you simply replace it with “remove”. Let’s use our “sl” package from earlier as an example.
sudo apt remove sl
Your output should look something like this:
(Image on original post)
As before, if it asks you if you wish to continue, press Y on your keyboard. Otherwise, if the output is similar to this, congratulations! You’ve successfully removed a package with Apt!
With Apt, updating is a simple process, and it updates all installed packages at once. Simply run this command:
sudo apt full-upgrade
I won’t attach an image here because depending on how m any packages you have installed, the output can get quite lengthy. However, it will most likely ask for confirmation, so press Y on your keyboard when prompted. full-upgrade checks all mirrors for the latest version of each package and installs it if the mirror’s version number is higher than your system’s.
In this tutorial you learned you to install, uninstall and update packages with the Apt Package Manager. If you enjoyed this article, please comment and share!