Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

viewing obsolete packages after upgrade to Stretch

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
erore
Posts: 8
Joined: 2017-03-11 13:29

viewing obsolete packages after upgrade to Stretch

#1 Post by erore »

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?

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

#2 Post by phenest »

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.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

erore
Posts: 8
Joined: 2017-03-11 13:29

Re: viewing obsolete packages after upgrade to Stretch

#3 Post by erore »

If I remove the obsolete packages, many other packages become broken. So how do I proceed safely?

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

#4 Post by phenest »

How did you upgrade to Stretch?
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

erore
Posts: 8
Joined: 2017-03-11 13:29

Re: viewing obsolete packages after upgrade to Stretch

#5 Post by erore »

I followed:
https://www.debian.org/releases/stretch ... ng.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.

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

#6 Post by phenest »

There's your mistake. You changed the sources.list to stretch and then did upgrade before dist-upgrade. Doing an upgrade wasn't necessary.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2042
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 149 times
Been thanked: 212 times

Re: viewing obsolete packages after upgrade to Stretch

#7 Post by Hallvor »

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.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

#8 Post by phenest »

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.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2042
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 149 times
Been thanked: 212 times

Re: viewing obsolete packages after upgrade to Stretch

#9 Post by Hallvor »

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
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: viewing obsolete packages after upgrade to Stretch

#10 Post by phenest »

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.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: viewing obsolete packages after upgrade to Stretch

#11 Post by dasein »

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.

Post Reply