LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Different output of apt-get and aptitude for package upgarde (https://www.linuxquestions.org/questions/debian-26/different-output-of-apt-get-and-aptitude-for-package-upgarde-4175571599/)

travis82 02-06-2016 12:11 PM

Different output of apt-get and aptitude for package upgarde
 
Hi
Normally I use apt-get for to upgrade my Debian system. Today i tried to compare apt-get and aptitude with respect to system upgrade. Surprisingly I got different results.

Code:

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  openjdk-7-jre openjdk-7-jre-headless
The following packages will be upgraded:
  libtiff5
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 213 kB of archives.
After this operation, 44.0 kB disk space will be freed.

Code:

sudo aptitude safe-upgrade
Resolving dependencies...               
The following NEW packages will be installed:
  libsctp1{a} lksctp-tools{a}
The following packages will be upgraded:
  libtiff5 openjdk-7-jre openjdk-7-jre-headless
3 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.9 MB/45.9 MB of archives. After unpacking 9,130 kB will be used.

What is behind these results? Which method is safer?

descendant_command 02-06-2016 02:29 PM

Use 'aptitude full-upgrade' to ensure your system is up to date.

The results above beg the question of what you have done to cause apt-get to be holding back those packages.

jens 02-08-2016 08:24 AM

Quote:

Originally Posted by travis82 (Post 5496317)
What is behind these results?

"apt-get upgrade" will not use non-installed packages if you don't ask it to do so (shouldn't happen in stable though, use dist- or full-upgrade as "descendant_command" already mentionned).

Quote:

Originally Posted by travis82 (Post 5496317)
Which method is safer?

Both.
At the end, your package manager is still DPKG.
As long as it can keep track of everything, their's nothing to worry about.

PS: ... one other user tool is the new "apt" binary (as in: "apt install foobar), it aims to combine most lower level tools with some extras (like a nice progress bar).

travis82 02-08-2016 11:31 PM

Thank you both


All times are GMT -5. The time now is 12:37 AM.