Should I use apt-get or aptitude?

Questions about software.
User avatar
Raoldkel
Posts: 113
Joined: 08 Aug 2013 08:01
Location: Ireland

Should I use apt-get or aptitude?

Postby Raoldkel » 27 Apr 2014 18:17

Hi all.

Should I use apt-get or aptitude to install software? Is one recommended over the other?

Also which would be best of these?

Code: Select all

sudo apt-get upgrade
#vs
sudo aptitude safe-upgrade

Code: Select all

sudo apt-get dist-upgrade
#vs
sudo aptitude full-up
Thanks.


User avatar
zerozero
Posts: 5373
Joined: 10 Feb 2013 23:37
Location: West Midlands, England
Contact:

Re: Should I use apt-get or aptitude?

Postby zerozero » 27 Apr 2014 19:50

hi
Raoldkel wrote:Should I use apt-get or aptitude to install software? Is one recommended over the other?
you will see, usually, in the debian documentation apt-get being used but it's really up to you to make that choice.
aptitude has a more complex resolver and will try harder (sometimes too hard) to solve dependencies (even if that means uninstall half of the system, it's a more robust package manager but also more dangerous if you are not aware of what you are doing);
apt-get is more straightforward: it either install or not and fails.
Raoldkel wrote:Also which would be best of these?
here the option is clear
either

Code: Select all

sudo apt-get dist-upgrade
or

Code: Select all

sudo aptitude full-upgrade
upgrades in testing and/or sid should always be considered as full distribution upgrades allowing new packages to install, old ones to be removed and the existing ones to be upgraded to the latest version and only dist-upgrade/full-upgrade can do that.

worst, if you keep on using upgrade/safe-upgrade (at least for a long period of time) you are introducing breakages into the system that otherwise wouldn't be there. (thinking of playing safe and destroying the system with that, the irony :roll: )
bliss of ignorance

User avatar
Raoldkel
Posts: 113
Joined: 08 Aug 2013 08:01
Location: Ireland

Re: Should I use apt-get or aptitude?

Postby Raoldkel » 27 Apr 2014 19:53

Hi zerozero.

Thanks for the clarification.

I've also heard that if someone was to use apt-get or aptitude, that they should stick to one and not mix. Is this so?


Rocky
Posts: 127
Joined: 15 Apr 2014 11:04
Location: Ireland

Re: Should I use apt-get or aptitude?

Postby Rocky » 27 Apr 2014 22:02

Hi Raoldkel

I am only a new user and no expert but I have been looking into apt-get etc - don't know if the second note below the table here http://www.debian.org/doc/manuals/debia ... ommandline helps ?

Rocky
"All that glisters is not gold" - Shakespeare "The Merchant of Venice"

rokytnji
Posts: 713
Joined: 02 Oct 2013 01:51

Re: Should I use apt-get or aptitude?

Postby rokytnji » 27 Apr 2014 22:13

Should I use apt-get or aptitude?
Beats me. I use

https://wiki.debian.org/Wajig

http://www.togaware.com/linux/survivor/ ... rview.html

https://packages.debian.org/search?suit ... ords=wajig

But I am a loosy goosy type of Solydxk user with no mission critical machines.
I run it along with apt-get.
YMMV from mine so any breakage is on your head.

User avatar
zerozero
Posts: 5373
Joined: 10 Feb 2013 23:37
Location: West Midlands, England
Contact:

Re: Should I use apt-get or aptitude?

Postby zerozero » 27 Apr 2014 22:42

Raoldkel wrote:I've also heard that if someone was to use apt-get or aptitude, that they should stick to one and not mix. Is this so?
you should find endless discussions about this all over the internet; from my experience (and only that) apt-get and aptitude use different resolvers so they are not necessary aware of what the other has done; this in some special corner-cases can be tricky and output unwanted results;
giving you a classical example:
apt-get prints the autoremovals but takes no action about it;
if you switch to aptitude, it will uninstall automatically those packages (there's a way around this [with aptitude keep-all] but that's not the default behavior)
[another discussion is if those packages marked as autoremovals are really needed or not: my experience here is mixed, sometimes you'll see there packages that are needed/useful, most of the time junk]
bliss of ignorance

kurotsugi
Posts: 2290
Joined: 09 Jan 2014 00:17

Re: Should I use apt-get or aptitude?

Postby kurotsugi » 28 Apr 2014 04:44

I've also heard that if someone was to use apt-get or aptitude, that they should stick to one and not mix. Is this so?
I mixed them for a long time and never got any problem with it :3
one of the reason could be because any package installed/removed with with apt-get, aptitude want to revert it. you can try it by yourself
1. run aptitude on your terminal and cancel his pending actions. ('sudo aptitude' - actions - cancel pending actions)
2. install random small package with apt-get
3. run aptitude again. check the pending action (press g). you'll see that aptitude want to remove that package.

nevertheless, it's just a small matter and the aptitude behaviour can be safely ignored (simply cancel the pending action just like we did above). the real problem is that ,as described by z, apt-get and aptitude have different way to resolve broken package. on my experience, this isn't a big issue on debian stable/testing. apt-get and aptitude on most cases gives similar result. however, on debian sid, the result could be quite huge. personally I prefer aptitude over apt-get for installing/removing packages for two reason.
1. it could autoremove unneeded package.
2. apt-get only gives single solution while aptitude gives me more than one solution so that I could choose the best for my system.

wayne
Posts: 178
Joined: 25 Feb 2013 14:58

Re: Should I use apt-get or aptitude?

Postby wayne » 28 Apr 2014 05:23

This subject reminds me of an incidence.

While I was learning to use a Debian distros, now no longer exists..
When I posted using apt-get for some help, I was scolded!! because the rule there was ONLY aptitude was accepted. :twisted:
Then I did not know the difference.

Over years, I continue to use both.
But mostly apt-get.
When apt-get got into conflict, I used aptitude just to get some issue resolve so that I can still have working system for my Debian Sid installation.

I would still continue to use both of them.

User avatar
MoldMe
Posts: 58
Joined: 01 May 2014 09:37

Re: Should I use apt-get or aptitude?

Postby MoldMe » 01 May 2014 10:10

I concur with what zerozero stated. There's a good post over in the Siduction forums that basically states the same thing about why you should use apt-get in a Sid-based distro.

Edit: From the Siduction forum: "...We recommend apt-get because its dumb enough for a fast moving target like sid. aptitude try to be clever in situations where no cleverness is needed"

http://forum.siduction.org/index.php?to ... 2#msg25122

CrunchBang -- Siduction -- SolydBang (Openbox, Tint2, most of XFCE4 removed, CrunchBang scripts)

Nomen Nescio
Posts: 63
Joined: 02 Oct 2013 09:01

Re: Should I use apt-get or aptitude?

Postby Nomen Nescio » 01 May 2014 11:46

aptitude has a more complex resolver and will try harder (sometimes too hard) to solve dependencies (even if that means uninstall half of the system, it's a more robust package manager but also more dangerous if you are not aware of what you are doing);
I experienced this last weekend when I tried to 'repair' my SolydKBE installation, which had 'some' issues after the update...

User avatar
Raoldkel
Posts: 113
Joined: 08 Aug 2013 08:01
Location: Ireland

Re: Should I use apt-get or aptitude?

Postby Raoldkel » 02 May 2014 20:26

MoldMe wrote:...There's a good post over in the Siduction forums that basically states the same thing about why you should use apt-get in a Sid-based distro...[/url]
But Sid is Unstable. SolydXK is Testing. So what's advisable practice on Sid (e.g. apt-get) is also generally recommended on Testing?


User avatar
zerozero
Posts: 5373
Joined: 10 Feb 2013 23:37
Location: West Midlands, England
Contact:

Re: Should I use apt-get or aptitude?

Postby zerozero » 02 May 2014 23:41

the question is not (generally) the tool, it's the user.
apt-get and aptitude are both fine but the latter requires a more mature, aware user behind the keyboard.
apt-get is linear (dumb as agaida says)
bliss of ignorance

User avatar
fleabus
Posts: 1227
Joined: 16 Sep 2013 04:24
Location: Winchester, VA USA

Re: Should I use apt-get or aptitude?

Postby fleabus » 02 May 2014 23:58

Concur with both wayne and zerozero on this one. Mostly I use apt-get. Sometimes when things get hairy I ask myself what would aptitude do? The results can be very instructive....


Return to “Software”

Who is online

Users browsing this forum: No registered users and 11 guests