1

I've had numerous problems in the past where apt-get fails to do something and gives a confusing reason why which doesn't help me solve the problem, but aptitude guesses some alternative action that fixes things.

Should I always use aptitude to avoid these problems in the first place? I'm just trying to understand whether there are drawbacks to the tool or I'm just missing some critical knowledge about using apt-get that makes me prone to errors.

2 Answers2

2

Read here more detailed information about differences between package managers.

As for apt-get you reffered to new dependencies of a package that gets hold or etc. apt-get has a command (function) which is not always used in common for example to update and upgrade packages:

sudo apt-get update && sudo apt-get upgrade --with-new-pkgs

the command with --with-new-pkgs is very useful sometimes and it means:

   Allow installing new packages when used in conjunction with
   upgrade. This is useful if the update of a installed package
   requires new dependencies to be installed. Instead of holding the
   package back upgrade will upgrade the package and install the new
   dependencies. Note that upgrade with this option will never remove
   packages, only allow adding new ones.
JoKeR
  • 7,062
0

Always use sudo apt-get upgrade until you run into problems.

Then use:

  1. sudo apt-get update && sudo apt-get upgrade

If that still poses problems use:

  1. sudo apt-get update && sudo apt-get upgrade --with-new-pkgs

And only then use:

  1. aptitude and cycle through the proposed solutions and take the best one for you!

Otherwise, one of these days you're going to back yourself into a corner you won't get out of any more …

Also, start making system back-ups if you're not making those yet and keep at least 2 system back-ups.

Fabby
  • 35,017