News for hackers. Stuff that matters.
Re:Linux Package Manager Command Line Comparison by Mavrik on Thursday January 26, 2012 @09:49AM (#3514332)
I've been using Ubuntu with apt-get for quite a few years now. What additional funcionality does aptitude offer over "plain" apt-get?
Re:Linux Package Manager Command Line Comparison by obtu on Thursday January 26, 2012 @11:30AM (#3514708)
My favourite feature is the search capabilities, which are well integrated and extremely powerful.

    # installed packages with yaml in the name
    aptitude search '~i yaml'

    # installed packages requiring yaml
    # (~D means depends on)
    aptitude search '~i ~D yaml'

    # packages whose name starts with lib and
    # mentioning SQL in their descriptions
    aptitude search '^lib ~d sql'

    # installed packages from some non-standard repo
    # apt-cache policy describes package origins
    aptitude search '~i ?origin(apt.opscode.com)'

    # why is libvirt0 installed?
    aptitude why libvirt0

    # which ubuntu metapackage is keeping libvirt0 installed?
    aptitude why '~i ubun' libvirt0 

    # don't keep any transitional package installed
    sudo aptitude markauto '~i ~d transitional'

    # purge ganeti packages
    sudo aptitude purge '~i ganeti'
Re:Linux Package Manager Command Line Comparison by nicktelford on Thursday January 26, 2012 @12:26PM (#3514997)
I didn't know about this matching. Awesome.

Now I'm even more annoyed that our servers are all CentOS :(

Re:Linux Package Manager Command Line Comparison by nicktelford on Thursday January 26, 2012 @09:53AM (#3514344)
The biggest advantage is when removing packages; its dependency resolution is (supposedly) much better so it's able to find and remove orphan packages more accurately without hosing your system.

It's also got a much friendlier set of commands:

  $ apt-get upgrade vim # aptitude upgrade vim

  $ apt-get dist-upgrade # aptitude full-upgrade

  $ apt-cache search # aptitude search

  $ apt-get install --reinstall vim # aptitude reinstall vim

  $ apt-get remove --purge vim # aptitude purge vim
The list goes on.

It's also got an awesome ncurses based interactive interface if you just type:

  $ aptitude
Great for sysadmins who miss synaptic or anyone who feels like a GUI is just too mainstream.
Re:Linux Package Manager Command Line Comparison by ernesth on Thursday January 26, 2012 @10:19AM (#3514436)
apt-get also is able to remove orphaned libraries.

Among other "advantages" of aptitude, it can be terribly slower than apt-get. And it has a "smart" dependency engine that often proposes convoluted solutions (involving uninstalling packages I don't want uninstalled) when apt-get will simply update the dependency and their dependents... But at least, if you don't agree with the first solutions, it has others (sometimes including the one apt-get chooses).

Re:Linux Package Manager Command Line Comparison by bostonvaulter2 on Thursday January 26, 2012 @02:01PM (#3515429)
What's the history of the aptitude and apt-* family of commands? Why do they both exist?
Re:Linux Package Manager Command Line Comparison by sciurus on Thursday January 26, 2012 @02:17PM (#3515508)
Re:Linux Package Manager Command Line Comparison by JoshTriplett on Thursday January 26, 2012 @10:21AM (#3514444)
Aptitude has an optional screen-oriented GUI, much better search and filtering capabilities, a listing of "new" packages each time you update, and an excellent dependency resolver.