2

I just upgraded my system from Lenny to Squeeze following the steps posted here. I followed all the steps using apt-get (in the upgrade from Etch to Lenny i used aptitude as suggested) and the upgrade went fine.

In the daily routine I use aptitude to maintain the system up to date and I really like the automatic handling of unused packages, so if I install package A that depends on B when I remove A, B is removed too keeping my system clean.

My question is the following: do apt-get and aptitude share the automatic handling of packages? I don't think so, because I found a lot of packages not marked as Auto in aptitude after the upgrade via apt-get.

Am I right? How can I fix this in automated way if the answer is yes?

2

3 Answers 3

2

(Adding an answer so the information is here, too)

aptitude keeps some state over and above the underlying apt-get system. This results in information set in one that the other doesn't know about. Years ago when I still used aptitude, I found myself doing update checks in both because I was getting confusing results. Using aptitude exclusively would hide this problem, but as soon as you something else, it becomes apparatnt.

Solution: either use only aptitude or never use aptitude.

3
  • I always use aptitude, but this time I used apt-get because is recommended in the releases notes of Squeeze. Hope this won't give me problems in dependencies tracking in future updates.
    – Fabio
    Feb 7, 2011 at 20:50
  • 3
    ever since apt 0.7, apt and aptitude share the information about automatically installed pacakges. Its no longer necessary to only use one or the other.
    – stew
    Feb 22, 2011 at 17:29
  • @Stew, that's good to know. If only more people could be told about it, as otherwise aptitude may die a slow death.
    – staticsan
    Feb 22, 2011 at 23:05
2

The release notes say you should use apt-get to upgrade, not aptitude.

http://www.debian.org/releases/squeeze/i386/release-notes/ch-upgrading.en.html#upgradingpackages+

The recommended way to upgrade from previous Debian GNU/Linux releases is to use the package management tool apt-get. In previous releases, aptitude was recommended for this purpose, but recent versions of apt-get provide equivalent functionality and also have shown to more consistently give the desired upgrade results.

2
  • I did used apt-get for the upgrade, but usually I use aptitude for normal activities on the system. I want to know if this mix of usage could lead to strange behaviors in the future.
    – Fabio
    Feb 7, 2011 at 20:48
  • Fabio: no, this mix is fine. In the past (before apt 0.7), the mix could cause problems, but this should no longer be the case. If it were, the release team would certainly not be recommending it in the upgrade procedure.
    – stew
    Feb 22, 2011 at 17:30
0

You can have automatic handling of unused packages by using apt-get --auto-remove remove/purge.

If that's tedious to type, just make an alias. Mine is rr and rrp, respectively.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .