How to do an advanced package search with Aptitude for Linux or Debian

Who I am
Marie-Ange Demory
Author and references

You can perform advanced searches for packages within Debian or Linux operating systems with the tool Aptitude. With it, it is also possible to install, delete or delete from the system any program or file that we want to make disappear.

Like many of the actions within Linux, this requires the use of executed commands from a terminal. In the respective terminals we put all the codes to configure the system in the way we deem appropriate.

In See How It's Done we will give you the commands to use Aptitude to perform advanced searches in the terminal.

Do advanced searches with Aptitude on Linux or Debian

The basic command to do any type of search is " sudo aptitude search ", Followed by what is explicitly requested. They can be program names or something specific, but with super user privileges for the sudo command.

With this, we can do the more advanced search, because we have the basic command to execute given one of them. An example of this search is when we want to search for new files or packages, for which we have to put a ' ~ N '.

It should be noted that this term must be preceded by the base command that we mentioned earlier, for it to work. If we run it, Aptitude will display a list of all new packages and files within the system, very quickly.

If what we want is to search for files or packages that are modified, we need to enter the command sudo aptitude search edit. Like the previous time, a list will be shown, but with items that have been changed or changed.

In case we are interested in looking for files with a specific description, we need to add it to the basic command we mentioned. An example could be the command ~ instagram, which will show packages that have the word Instagram in their description.

We can also search for items that start with a specific word in the name we gave them when they were saved. We just have to enter the basic command and add the ^ symbol at the end, followed by the word we are looking for.

We can also search for packages ending with your name with a word we care about for anything. In this case, instead of placing the ^ symbol, we place the $ symbol at the end of that word highlighted.

These are the commands most commonly used in advanced searches with Aptitude for the Linux and Debian operating systems.

Other advanced search commands and important system features

We can be much more specific than we have been in previous searches to make procedures much more complex. For example, if we search for a file with a certain description, but rejecting an element in its name, we use special elements.

There are ~d e !~N ^, the first speaks of the description we are looking for and the other rejects a word. It must be at the beginning of the name, i.e. reject packets starting with that word.

We must always remember that these special commands they must be preceded by the base command that we mentioned above. When the commands are used correctly, you can search for anything within the Linux system, with Aptitude.

Using Linux commands is an interesting topic, but many users are also looking for ways to use logs. These types of files are essential to inform the person of any messages representative of the system, making them very essential.

And, like many other operating systems, Linux needs constant maintenance and overhaul for its correct functioning. Stacer and Bleachbit are operating system cleaners, very good especially for Ubuntu operating systems.

When we handle commands with ease in Linux terminals, everything becomes much easier for us to do. It is important to remember that these actions are super user and permissions such as sudo or root are required.

You can find more information about the Linux system in other articles on the See how it's done page. We have many elements of interest, which can clear up many doubts and questions to anyone who needs a lot of help.

add a comment of How to do an advanced package search with Aptitude for Linux or Debian
Comment sent successfully! We will review it in the next few hours.