viewing obsolete packages after upgrade to Stretch

Help with issues regarding installation of Debian

viewing obsolete packages after upgrade to Stretch

Postby erore » 2017-06-19 17:06

How can I see obsolete packages after upgrading to Stretch?

From the documentation: "Detecting which packages in an updated system are “obsolete” is easy since the package management front-ends will mark them as such. If you are using aptitude, you will see a listing of these packages in the “Obsolete and Locally Created Packages” entry."

But if I look there, there is e.g. mysql-server-core-5.5, is this package obsolete? If I remote, dependencies break and this is also true for many others in the “Obsolete and Locally Created Packages”. Or are these the so called “Locally Created Packages” in which case I have no idea what that means, as I have not created any packages locally, all of them have been installed with 'apt-get install ' thus they cannot be marked as locally created.

So back to the original question: How do I view and safely remove obsolete packages after upgrade to Stretch?
erore
 
Posts: 7
Joined: 2017-03-11 13:29

Re: viewing obsolete packages after upgrade to Stretch

Postby phenest » 2017-06-19 17:11

erore wrote:How can I see obsolete packages after upgrading to Stretch?

Code: Select all
apt-get install apt-show-versions
apt-show-versions | grep 'No available version'

erore wrote:But if I look there, there is e.g. mysql-server-core-5.5, is this package obsolete?

Correct.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

Postby erore » 2017-06-19 18:13

If I remove the obsolete packages, many other packages become broken. So how do I proceed safely?
erore
 
Posts: 7
Joined: 2017-03-11 13:29

Re: viewing obsolete packages after upgrade to Stretch

Postby phenest » 2017-06-19 18:30

How did you upgrade to Stretch?
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

Postby erore » 2017-06-19 19:15

I followed:
https://www.debian.org/releases/stretch/amd64/release-notes/ch-upgrading.en.html

So after removing packages which i installed by dpkg, I changed sources.list and
apt-get update
apt-get upgrade
apt-get dist-upgrade
then apt-get update
and apt-get upgrade to update kernel then reboot.
erore
 
Posts: 7
Joined: 2017-03-11 13:29

Re: viewing obsolete packages after upgrade to Stretch

Postby phenest » 2017-06-19 19:23

There's your mistake. You changed the sources.list to stretch and then did upgrade before dist-upgrade. Doing an upgrade wasn't necessary.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

Postby Hallvor » 2017-06-19 19:30

phenest wrote:There's your mistake. You changed the sources.list to stretch and then did upgrade before dist-upgrade. Doing an upgrade wasn't necessary.


It is not a mistake. A two stage upgrade is not only no mistake, but also recommended.

From the release notes:

4.4.4. Minimal system upgrade

In some cases, doing the full upgrade (as described below) directly might remove large numbers of packages that you will want to keep. We therefore recommend a two-part upgrade process: first a minimal upgrade to overcome these conflicts, then a full upgrade as described in Section 4.4.5, “Upgrading the system”.


To the OP: I used deborphan to detect the files that can be removed, but do not trust it blindly.

https://debian-administration.org/artic ... _deborphan

...or you can just leave those files alone and not potentially break your system.
Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 300 GB HDD, Debian Stretch (KDE)
User avatar
Hallvor
 
Posts: 724
Joined: 2009-04-16 18:35
Location: Norway

Re: viewing obsolete packages after upgrade to Stretch

Postby phenest » 2017-06-19 19:38

Hallvor wrote:
In some cases, doing the full upgrade (as described below) directly might remove large numbers of packages that you will want to keep.

Which means it's only recommended if that is the case.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

Postby Hallvor » 2017-06-19 19:48

phenest wrote:
Hallvor wrote:
In some cases, doing the full upgrade (as described below) directly might remove large numbers of packages that you will want to keep.

Which means it's only recommended if that is the case.


No.

This has the effect of upgrading those packages which can be upgraded without requiring any other packages to be removed or installed.

The minimal system upgrade can also be useful when the system is tight on space and a full upgrade cannot be run due to space constraints.

If the apt-listchanges package is installed, it will (in its default configuration) show important information about upgraded packages in a pager. Press q after reading to exit the pager and continue the upgrade.

4.4.5. Upgrading the system

Once you have taken the previous steps, you are now ready to continue with the main part of the upgrade. Execute:

# apt-get dist-upgrade
Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 300 GB HDD, Debian Stretch (KDE)
User avatar
Hallvor
 
Posts: 724
Joined: 2009-04-16 18:35
Location: Norway

Re: viewing obsolete packages after upgrade to Stretch

Postby phenest » 2017-06-19 20:29

Hallvor wrote:No.

Please be more articulate with your responses.

Check all the recently opened threads with this issue and you'll find the OP has followed that recommendation. If that recommended procedure is correct, why are so many having problems? And the answer is, because it's not always necessary. A simple update and dist-upgrade is all that is generally needed.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

Postby dasein » 2017-06-19 20:33

Hallvor wrote:A two stage upgrade is not only no mistake, but also recommended.

+1

Hallvor wrote:...or you can just leave those files alone and not potentially break your system.

+100

@OP: Whatever disk space you might "save" quite literally isn't worth the time you have already put into this.
User avatar
dasein
 
Posts: 7768
Joined: 2011-03-04 01:06
Location: Terra Incantationum


Return to Installation

Who is online

Users browsing this forum: None1975, wrmelgaard and 6 guests

fashionable