AI Hints
Home›Linux Tutorial›Installing Software
Linux · Lesson 78 of 120

apt: Search and Remove

Finding and uninstalling.

⏱ 2 min read▶ Video at 1:43:33🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

How do you find the right package, if you don't know its name? And how do you remove something you don't need any more? APT has commands for both.

apt: Search and Remove
From the video: apt: Search and Remove
  • Don't know the name?
  • Don't need it any more?
  • apt does both

Searching

APT search looks through the names and descriptions of every package. Here we search for figlet. Each result shows a package name, and a short description underneath. Searching doesn't need sudo, because it doesn't change anything.

Terminal
apt search figlet
Sorting... Done
Full Text Search... Done
figlet/noble 2.2.5-3 arm64
  Make large character ASCII banners out of ordinary text

php-text-figlet/noble 1.0.2-5 all
  Engine for use FIGlet fonts to rendering text

python3-pyfiglet/noble 1.0.2+dfsg-1 all
  Python 3 port of the FIGlet specification

Removing

Sudo APT remove uninstalls a package. Afterwards, the command is gone, and the shell can't find it. APT autoremove cleans up extra packages that were only installed as dependencies, and aren't needed any more.

Terminal
sudo apt remove -y figlet
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  figlet
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 745 kB disk space will be freed.
(Reading database ... 8307 files and directories currently installed.)
Removing figlet (2.2.5-3) ...
Processing triggers for man-db (2.12.0-4build2) ...
figlet hello
bash: figlet: command not found

The apt cheat sheet

Here are the APT commands you'll use most. Update refreshes the list. Upgrade installs newer versions of everything you have. Install, and remove. Search, to find packages. And list dash dash installed, to see what's on your system.

CommandDoes
sudo apt updaterefresh the package list
sudo apt upgradeupdate everything installed
sudo apt install xinstall
sudo apt remove xuninstall
apt search wordfind packages

Summary

APT search finds packages, remove uninstalls them, and upgrade keeps everything up to date. Next, a new topic. Processes, the programs that are running right now.

Key takeaways
  • apt search
  • sudo apt remove
  • sudo apt upgrade
Next up: Processes — programs that are running