APT vs. Aptitude in the real life

Discuss non-support related topics related to LMDE.
Forum rules
Before you post please read this

APT vs. Aptitude in the real life

Postby zerozero on Sun May 08, 2011 3:13 pm

ok, apparently it's easy, we have the man pages, tones of info in the Debian site, but when it comes to questions like:

what's the difference between apt and aptitude or how do they handle updates

Good guide-lines, but let's see in the real life the differences, the similarities, the advantages (?)
This sid install is not updated for about a week (maybe more), so it's the perfect place for the test:

apt upgrade
265 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
Need to get 392 MB of archives.
After this operation, 6,724 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.


apt dist-upgrade
326 upgraded, 10 newly installed, 8 to remove and 1 not upgraded.
Need to get 437 MB of archives.
After this operation, 57.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.


aptitude safe-upgrade
280 packages upgraded, 4 newly installed, 6 to remove and 45 not upgraded.
Need to get 409 MB of archives. After unpacking 4,868 kB will be used.
Do you want to continue? [Y/n/?] n
Abort.


aptitude upgrade
280 packages upgraded, 4 newly installed, 6 to remove and 45 not upgraded.
Need to get 409 MB of archives. After unpacking 4,868 kB will be used.
Do you want to continue? [Y/n/?] n
Abort.


aptitude full-upgrade
325 packages upgraded, 10 newly installed, 6 to remove and 0 not upgraded.
Need to get 437 MB of archives. After unpacking 21.3 MB will be used.
The following packages have unmet dependencies:
libpurple0: Depends: perlapi-5.10.1 which is a virtual package.
gnome-icon-theme-extras: Depends: gnome-icon-theme (>= 3.0) but 2.30.3-2 is installed.
libperl5.10: Depends: perl-base (= 5.10.1-20) but 5.12.3-6 is to be installed.
pidgin: Depends: perlapi-5.10.1 which is a virtual package.
libgstreamer-perl: Depends: perlapi-5.10.1 which is a virtual package.
The following actions will resolve these dependencies:

Remove the following packages:
1) gnome-icon-theme-extras
2) libgstreamer-perl
3) libperl5.10
4) libpurple-bin
5) libpurple0
6) pidgin
7) pidgin-plugin-pack
8 ) pidgin-themes
9) xchat

Leave the following dependencies unresolved:
10) xchat-common recommends xchat
11) gmusicbrowser recommends libgstreamer-perl
12) mercurial-common recommends mercurial (= 1.8.1-3)


Accept this solution? [Y/n/q/?]



my conclusions

  • apt and aptitude handle updates and package management in a total different way, so a golden rule here is if you start with one, stick with it
  • the most radical is dist-upgrade: it offers you a scenario, and either you accept it or not, with the risk of breaking your system
  • full-upgrade gives you several scenarios to solve the issue, you are required to know more about linux to go though it
  • aptitude upgrade and safe-upgrade showed the same output, maybe was just this case-scenario, i don't know
  • for me, i stick with apt and dist-upgrade, it's easier to read, if you see something fishy, just hit n and wait for another day;
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Linux Mint is funded by ads and donations.
 

Re: APT vs. Aptitude in the real life

Postby DrHu on Sun May 08, 2011 4:15 pm

Debian developers keep flip-flopping on Aptitude vs Apt
--since apt seems able to handle almost the same conditions as aptitude; unless you like the different and more gui ---(ncurses, which I like for midnight commander file management or other applications like tops or htop, that gui-look doesn't do anything for me as an updating tool)
---look of aptitude, what is a good reason to use it for most users who are just doing simple system updates
    I can't think of any..

if it matters, an opinion of the differences..
http://www.andrewault.net/2010/05/03/ap ... parison-2/
    Apt-get does not remove packages it installed as dependencies when the package you specified to be installed is removed. Aptitude does remove unneeded dependencies. This basic difference can cause problems when switching from apt-get to aptitude.
that might be aptitude's best advantage, although it isn't as much of a problem as it is being made out to be (not removing suggested or dependency parts of a package..)
User avatar
DrHu
Level 16
Level 16
 
Posts: 6714
Joined: Wed Jun 17, 2009 8:20 pm

Re: APT vs. Aptitude in the real life

Postby zerozero on Sun May 08, 2011 7:02 pm

DrHu,
thanks for the link! very insightful;

Apparently, lately Debian has flipped over to apt

Note

Although the aptitude command comes with rich features such as its enhanced package resolver, this complexity has caused (or may still causes) some regressions such as Bug #411123, Bug #514930, and Bug #570377. In case of doubt, please use the apt-get and apt-cache commands over the aptitude command.
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Re: APT vs. Aptitude in the real life

Postby wayne128 on Sun May 08, 2011 7:49 pm

just for checking on my aptosid, it has apt-get by default
so I install aptitude for comparison
then here is what I had
surprised?

#apt-get update && apt-get dist-upgrade

Code: Select all
The following NEW packages will be installed:
  g++-4.6 gcc-4.6 libstdc++6-4.6-dev libthunar-vfs-1-common libxcb-util0
  linux-headers-2.6.38-5.slh.3-aptosid-686
  linux-image-2.6.38-5.slh.3-aptosid-686
The following packages will be upgraded:
  binutils cpp-4.4 cpp-4.6 dictionaries-common e2fslibs e2fsprogs g++ g++-4.4
  gcc gcc-4.4 gcc-4.4-base gcc-4.6-base gir1.2-glib-2.0 libasound2 libaudio2
  libboost-iostreams1.42.0 libcomerr2 libconfig-inifiles-perl
  libdjvulibre-text libdjvulibre21 libgcc1 libgirepository-1.0-1 libgomp1
  libmpfr4 libogg0 libquadmath0 libsnmp-base libss2 libstdc++6
  libstdc++6-4.4-dev libthunar-vfs-1-2 libupower-glib1 libvte9
  libxcb-render-util0 linux-headers-2.6-aptosid-686
  linux-image-2.6-aptosid-686 linux-libc-dev python-gobject sun-java6-bin
  sun-java6-jre sun-java6-plugin xfce4-xkb-plugin xserver-xorg-video-intel
43 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 MB/119 MB of archives.
After this operation, 182 MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

# aptitude update && aptitude dist-upgrade

Code: Select all
The following NEW packages will be installed:
  g++-4.6{a} gcc-4.6{a} libstdc++6-4.6-dev{a} libthunar-vfs-1-common{a}
  libxcb-util0{a} linux-headers-2.6.38-5.slh.3-aptosid-686{a}
  linux-image-2.6.38-5.slh.3-aptosid-686{a}
The following packages will be upgraded:
  binutils cpp-4.4 cpp-4.6 dictionaries-common e2fslibs e2fsprogs g++
  g++-4.4 gcc gcc-4.4 gcc-4.4-base gcc-4.6-base gir1.2-glib-2.0 libasound2
  libaudio2 libboost-iostreams1.42.0 libcomerr2 libconfig-inifiles-perl
  libdjvulibre-text libdjvulibre21 libgcc1 libgirepository-1.0-1 libgomp1
  libmpfr4 libogg0 libquadmath0 libsnmp-base libss2 libstdc++6
  libstdc++6-4.4-dev libthunar-vfs-1-2 libupower-glib1 libvte9
  libxcb-render-util0 linux-headers-2.6-aptosid-686
  linux-image-2.6-aptosid-686 linux-libc-dev python-gobject sun-java6-bin
  sun-java6-jre sun-java6-plugin xfce4-xkb-plugin xserver-xorg-video-intel
The following packages are RECOMMENDED but will NOT be installed:
  firmware-linux-free gsfonts-x11 libnss-mdns python-gobject-cairo
43 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 MB/119 MB of archives. After unpacking 182 MB will be used.
Do you want to continue? [Y/n/?] n
Abort.


root@aptosidbox:/home/wayne# apt upgrade
bash: apt: command not found

root@aptosidbox:/home/wayne# apt dist-upgrade
bash: apt: command not found

root@aptosidbox:/home/wayne# aptitude upgrade
Code: Select all
Resolving dependencies...               
The following NEW packages will be installed:
  g++-4.6{a} gcc-4.6{a} libstdc++6-4.6-dev{a} libthunar-vfs-1-common{a}
  libxcb-util0{a} linux-headers-2.6.38-5.slh.3-aptosid-686{a}
  linux-image-2.6.38-5.slh.3-aptosid-686{a}
The following packages will be upgraded:
  binutils cpp-4.4 cpp-4.6 dictionaries-common e2fslibs e2fsprogs g++
  g++-4.4 gcc gcc-4.4 gcc-4.4-base gcc-4.6-base gir1.2-glib-2.0 libasound2
  libaudio2 libboost-iostreams1.42.0 libcomerr2 libconfig-inifiles-perl
  libdjvulibre-text libdjvulibre21 libgcc1 libgirepository-1.0-1 libgomp1
  libmpfr4 libogg0 libquadmath0 libsnmp-base libss2 libstdc++6
  libstdc++6-4.4-dev libthunar-vfs-1-2 libupower-glib1 libvte9
  libxcb-render-util0 linux-headers-2.6-aptosid-686
  linux-image-2.6-aptosid-686 linux-libc-dev python-gobject sun-java6-bin
  sun-java6-jre sun-java6-plugin xfce4-xkb-plugin xserver-xorg-video-intel
The following packages are RECOMMENDED but will NOT be installed:
  firmware-linux-free gsfonts-x11 libnss-mdns python-gobject-cairo
43 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 MB/119 MB of archives. After unpacking 182 MB will be used.
Do you want to continue? [Y/n/?] aptitude full-upgrade
Invalid response.  Please enter a valid command or '?' for help.
Do you want to continue? [Y/n/?] n

root@aptosidbox:/home/wayne# aptitude full-upgrade
Code: Select all
The following NEW packages will be installed:
  g++-4.6{a} gcc-4.6{a} libstdc++6-4.6-dev{a} libthunar-vfs-1-common{a}
  libxcb-util0{a} linux-headers-2.6.38-5.slh.3-aptosid-686{a}
  linux-image-2.6.38-5.slh.3-aptosid-686{a}
The following packages will be upgraded:
  binutils cpp-4.4 cpp-4.6 dictionaries-common e2fslibs e2fsprogs g++
  g++-4.4 gcc gcc-4.4 gcc-4.4-base gcc-4.6-base gir1.2-glib-2.0 libasound2
  libaudio2 libboost-iostreams1.42.0 libcomerr2 libconfig-inifiles-perl
  libdjvulibre-text libdjvulibre21 libgcc1 libgirepository-1.0-1 libgomp1
  libmpfr4 libogg0 libquadmath0 libsnmp-base libss2 libstdc++6
  libstdc++6-4.4-dev libthunar-vfs-1-2 libupower-glib1 libvte9
  libxcb-render-util0 linux-headers-2.6-aptosid-686
  linux-image-2.6-aptosid-686 linux-libc-dev python-gobject sun-java6-bin
  sun-java6-jre sun-java6-plugin xfce4-xkb-plugin xserver-xorg-video-intel
The following packages are RECOMMENDED but will NOT be installed:
  firmware-linux-free gsfonts-x11 libnss-mdns python-gobject-cairo
43 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 MB/119 MB of archives. After unpacking 182 MB will be used.
Do you want to continue? [Y/n/?]
Abort.

root@aptosidbox:/home/wayne#
wayne128
Level 10
Level 10
 
Posts: 3322
Joined: Tue Jul 13, 2010 12:15 am

Re: APT vs. Aptitude in the real life

Postby zerozero on Sun May 08, 2011 7:57 pm

8) yeahh a little :o
first because your aptosid is breakage free :shock: and second because in those conditions the results are the same no matter what tool you use 8)
zerozero
Level 16
Level 16
 
Posts: 6472
Joined: Tue Jul 07, 2009 2:29 pm

Re: APT vs. Aptitude in the real life

Postby linmint777 on Mon May 09, 2011 1:27 am

aptitude upgrade and safe-upgrade showed the same output, maybe was just this case-scenario, i don't know


read this:

The "upgrade" command is deprecated; use "safe-upgrade" instead.


are the same commands, just with different words.
circa 2007, aptitude change options "upgrade" to "safe-upgrade" and "dist-upgrade" to "full-upgrade" (do not know why, but suspect it is because of the similarity with the options that apt-get)
Linux Mint #1 Distro.
http://mintyubuntu.blogspot.com
User avatar
linmint777
Level 5
Level 5
 
Posts: 648
Joined: Thu Nov 26, 2009 11:00 am

Re: APT vs. Aptitude in the real life

Postby rizzeh on Mon May 09, 2011 2:45 pm

On sid and testing branches i prefer using aptitute, safe-upgrade and dist-upgrade option's clear difference is useful. On stable install apt-get is good enough. On distro's that use debian as base I go with whatever default is. As mentioned earlier, make sure to stick to one chosen package manager.
User avatar
rizzeh
Level 1
Level 1
 
Posts: 15
Joined: Fri Apr 17, 2009 3:26 pm

Linux Mint is funded by ads and donations.
 

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 3 guests