📜 ⬆️ ⬇️

aptitude vs apt. 5 reasons why I use aptitude

Five parameters by which aptitude exceeds (by the fourth parameter is not inferior) apt:

1. The consistency of syntax. And unity of management.
2. Search flexibility.
3. Labeling packages.
4. Resolving dependencies.
5. Interface.


')

1. The consistency of syntax. And unity of management


Compare:

Installation:
sudo aptitude install karma-tools
sudo apt-get install karma-tools

View package information:
aptitude show karma-tools
apt-cache show karma-tools

Package Label:
sudo aptitude markauto karma-tools
sudo apt-mark markauto karma-tools


So aptitude replaces a bunch of tools. What is easier for you: remember a bunch of different tools, or just one tool? Provided that in addition to the name, we must also remember the team?
It seems to me that it is more logical, simpler and more convenient, in this case aptitude.

2. Search flexibility



aptitude is often scolded: "looking for the wrong." Compare yourself:

image

image

aptitude by default only searches for a given word in package names, without touching the description.
And not by default like this:

image

Aptitude uses search queries. This gives room for fantasy: for example, what have kde-shny established there?
aptitude search '~ i ~ skde'

Top Searches:
~ nname - search in package name
~ dtext - search package description
~ i - selects only installed packages
~ U - selects packages that can be updated
A regular expression can be used as any of the templates. For example, ~ n ^ wget will select packages whose names begin with wget. Templates can be grouped by logical operands, for example ~ i ~ skde (both installed and from the KDE section). When specifying several search patterns, the logical AND is applied to them; if the patterns are separated by "|", then the logical or. Denial - "!", Grouping in brackets.
And, in general, the documentation is better described .

Can you also perform a flexible search using apt-cache?

3. Package Labels



sudo aptitude install --add-user-tag keyword-tag more different package.
sudo aptitude purge '?user-tag(keyword-tag)'

Can you do this using apt-get?

4. Resolving dependencies



Perhaps the most controversial moment.

imageimage

And now the most interesting:
image

Maybe aptitude marked the packages “for demolition”, and will delete them sometime later?
image

Not. All right, we will delete on a user-tag, not for nothing that we added it.

image
The number of installed and removed packages is the same.

Now, the same with apt:
image
image

image
For some reason I expected this.

You can say that kubuntu-desktop is a bad virtual package, and all because of this. I checked on wmaker and on apache2. Dependencies are solved in the same way.

5. Interface



Compare:
image
aptitude: everything is aligned, it is neatly shown which packages are installed, which can be installed, and which are marked for deletion. Packages are sorted alphabetically.
apt: dumped by a bunch of text. Who should be figured out.

Running aptitude without parameters, you get into the pseudo-graphic interface, and while the packages are swinging, you can play the sapper.

In my opinion, this is taking care of the user.

Source: https://habr.com/ru/post/74506/


All Articles