aptitude vs apt. 5 reasons why I use aptitude

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

    1. The syntax is logical. And unity of control.
    2. Search flexibility.
    3. Labeling packages.
    4. Resolution of dependencies.
    5. Interface.



    1. The logic of the syntax. And unity of governance


    Compare:

    Installation: Viewing package information: Package label: Thus, aptitude replaces a bunch of tools. Which is easier for you: remember a bunch of different tools, or just one tool? Provided that in addition to the name, you also need to remember the team? It seems to me that it is more logical, simpler and more convenient, in this case aptitude.
    sudo aptitude install karma-tools
    sudo apt-get install karma-tools


    aptitude show karma-tools
    apt-cache show karma-tools


    sudo aptitude markauto karma-tools
    sudo apt-mark markauto karma-tools





    2. Search flexibility



    aptitude is often criticized: "looking for it wrong." Compare for yourselves:

    image

    image

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

    image

    Aptitude uses search queries. This gives room for imagination: for example, what do we have installed kde-shnogo?
    aptitude search '~ i ~ skde'

    The most popular searches:
    ~ nname - search in the package name
    ~ dtext - search in the package description
    ~ i - selects only already installed packages
    ~ U - selects packages that can be updated
    Any of the patterns can be a regular expression. 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 multiple search patterns, logical AND is applied to them; if the patterns are separated by "|", then logical or. Negation - "!", Grouping in brackets.
    And, in general, everything is better described in the documentation .

    Can you also flexibly search using apt-cache?

    3. Labeling packages



    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. Resolution of 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. Okay, delete by user-tag, not for nothing that we added it.

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

    Now, the same thing with apt:
    image
    image

    image
    For some reason I was expecting 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 resolved equally.

    5. Interface



    Compare:
    image
    aptitude: everything is aligned, it is neatly shown which packages are installed, which can be installed, which are marked for removal. Packages are sorted alphabetically.
    apt: dumped out with a bunch of text. Who needs to figure it out.

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

    In my opinion, this is the concern for the user.

    Also popular now: