Discussion:
Bug#929003: release-notes: Provide specific instructions to remove obsolete packages
(too old to reply)
Karl O. Pinc
2019-05-15 02:20:01 UTC
Permalink
Package: release-notes
Severity: normal
Tags: patch

The buster release notes should provide more specifics when it comes
to removing obsolete packages.

The following patch makes 2 changes.

It recommends removing packages that are obsolete in stretch before
beginning the upgrade to buster.

It provides commands, instead of vague TUI recommendations, describing
how to remove obsolete packages.

Regards,
Karl

-- System Information:
Debian Release: 9.9
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-9-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Justin B Rye
2019-05-15 12:10:02 UTC
Permalink
Post by Karl O. Pinc
The buster release notes should provide more specifics when it comes
to removing obsolete packages.
The following patch makes 2 changes.
It recommends removing packages that are obsolete in stretch before
beginning the upgrade to buster.
Good idea.
Post by Karl O. Pinc
It provides commands, instead of vague TUI recommendations, describing
how to remove obsolete packages.
This might be a good idea, but I don't agree with the implementation.
The TUI reference currently in the text doesn't look vague to me, and
the only reason to get rid of it would be if we wanted to eliminate
references to aptitude in favour of apt.
Post by Karl O. Pinc
+ <para>
+ It is a good idea to <link linkend="obsolete">remove obsolete
+ packages</link> from your system before upgrading.
+ </para>
+
<section id="proposed-updates">
<title>The proposed-updates section</title>
<para>
@@ -1296,10 +1301,14 @@ $ aptitude purge '~c'
</para>
<para>
Detecting which packages in an updated system are <quote>obsolete</quote> is easy since the
If there's a line that needs changing, it's this one. To the best of
my knowledge it's only aptitude and synaptic that provide this
information, and synaptic's GUI requires you to go and look for it.
Post by Karl O. Pinc
- package management front-ends will mark them as such. If you are using
- <command>aptitude</command>, you will see a listing of these packages in the
- <quote>Obsolete and Locally Created Packages</quote> entry.
+ package management front-ends will mark them as such.
+ The <systemitem role="package">aptitude</systemitem> commands to list and
</para>
+ <screen>
+# aptitude search '~o'
(This one doesn't require root.)
Post by Karl O. Pinc
+# aptitude purge '~o'
+ </screen>
<para>
The <ulink url="&url-bts;">Debian Bug Tracking System</ulink>
often provides additional information on why the package was removed. You
For actual aptitude users the easiest and most obvious way of finding
the packages in question is to run "aptitude" (though in fact it's
likely they would already have it open by this stage) and look to see
if the TUI shows a line "Obsolete and Locally Created Packages". If
there is, you can purge them all by highlighting the line and hitting
"_g" (...and sanity-check what it says it's about to do, then...) "g".

("Obsolete" can be a confusing term; what aptitude means by it is "any
installed package which is not available in any version from any [known]
archive". So if you grab a single .deb out of experimental, that'll
count as "obsolete"; if you create a local repository full of linux-1.0
kernel-packages, those won't. But if you aren't deliberately doing
anything funny like that, the things that will naturally end up in
this category are the packages you installed in an earlier release
that aren't in the current release.)

Maybe it should be something like

<para>
Some package management front-ends provide easy ways of finding installed
packages that are no longer available from any known repository. The
<command>aptitude</command> text user interface lists them in the category
<quote>Obsolete and Locally Created Packages</quote>, and they can be
listed and purged from the commandline with:
</para>
<screen>
$ aptitude search '~o'
$ sudo aptitude purge '~o'
</screen>
--
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package
Karl O. Pinc
2019-05-15 12:40:01 UTC
Permalink
On Wed, 15 May 2019 12:59:04 +0100
Post by Justin B Rye
Post by Karl O. Pinc
The buster release notes should provide more specifics when it comes
to removing obsolete packages.
It provides commands, instead of vague TUI recommendations,
describing how to remove obsolete packages.
This might be a good idea, but I don't agree with the implementation.
The TUI reference currently in the text doesn't look vague to me, and
the only reason to get rid of it would be if we wanted to eliminate
references to aptitude in favour of apt.
See comments on text below.
Post by Justin B Rye
Post by Karl O. Pinc
+ <para>
+ It is a good idea to <link linkend="obsolete">remove obsolete
+ packages</link> from your system before upgrading.
+ </para>
+
<section id="proposed-updates">
<title>The proposed-updates section</title>
<para>
@@ -1296,10 +1301,14 @@ $ aptitude purge '~c'
</para>
<para>
Detecting which packages in an updated system are
<quote>obsolete</quote> is easy since the
If there's a line that needs changing, it's this one. To the best of
my knowledge it's only aptitude and synaptic that provide this
information, and synaptic's GUI requires you to go and look for it.
I'm ignorant here and reluctant to make any changes.
Post by Justin B Rye
Post by Karl O. Pinc
- package management front-ends will mark them as such. If you are using
- <command>aptitude</command>, you will see a listing of these packages in the
- <quote>Obsolete and Locally Created Packages</quote> entry.
+ package management front-ends will mark them as such.
+ The <systemitem role="package">aptitude</systemitem> commands to list and
</para>
+ <screen>
+# aptitude search '~o'
(This one doesn't require root.)
Yes. See more comment below.
Post by Justin B Rye
Post by Karl O. Pinc
+# aptitude purge '~o'
+ </screen>
<para>
The <ulink url="&url-bts;">Debian Bug Tracking System</ulink>
often provides additional information on why the package was removed. You
For actual aptitude users the easiest and most obvious way of finding
the packages in question is to run "aptitude" (though in fact it's
likely they would already have it open by this stage) and look to see
if the TUI shows a line "Obsolete and Locally Created Packages". If
there is, you can purge them all by highlighting the line and hitting
"_g" (...and sanity-check what it says it's about to do, then...) "g".
I'm an actual aptitude user, and pretty much the only time I've used
the TUI is when the release notes force me into it. I find working
in the TUI awkward and have had difficulty understanding what I'm
looking at and what will happen.

Anyway, I think giving command lines results in shorter and more
clear documentation.
Post by Justin B Rye
("Obsolete" can be a confusing term; what aptitude means by it is "any
installed package which is not available in any version from any
[known] archive". So if you grab a single .deb out of experimental,
that'll count as "obsolete"; if you create a local repository full of
linux-1.0 kernel-packages, those won't. But if you aren't
deliberately doing anything funny like that, the things that will
naturally end up in this category are the packages you installed in
an earlier release that aren't in the current release.)
Maybe it should be something like
<para>
Some package management front-ends provide easy ways of finding
installed packages that are no longer available from any known
repository. The <command>aptitude</command> text user interface lists
them in the category <quote>Obsolete and Locally Created
Packages</quote>, and they can be listed and purged from the
commandline with: </para>
<screen>
$ aptitude search '~o'
$ sudo aptitude purge '~o'
</screen>
I'm ok with that. In fact I like it. But I do have some comment.

First I don't like having sudo appear in commands, mostly because
it's not installed by default. Sure, it's a clear indicator that
you need to be root, and that's nice. But there are pluses and
minuses to sudo and it is not necessarily for everybody.

More significantly perhaps, it's really nice to be able to cut
and paste commands directly from the documentation. The appearance
of both sudo and a shell prompt character prevents this.

I think, for this case, if I had my choice, I'd prefer:

<screen>
aptitude search '~o' ;# Works when not root
aptitude purge '~o' ;# Requires root
</screen>

I'm not arguing hard here. This is a larger question
that requires consistency throughout the documentation.
I'm putting it forward here so people can think about it
and maybe the issues can be considered and consensus reached
in the future.

Regards,

Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Justin B Rye
2019-05-15 14:50:01 UTC
Permalink
Post by Karl O. Pinc
Post by Justin B Rye
Post by Karl O. Pinc
+# aptitude purge '~o'
+ </screen>
<para>
The <ulink url="&url-bts;">Debian Bug Tracking System</ulink>
often provides additional information on why the package was removed. You
For actual aptitude users the easiest and most obvious way of finding
the packages in question is to run "aptitude" (though in fact it's
likely they would already have it open by this stage) and look to see
if the TUI shows a line "Obsolete and Locally Created Packages". If
there is, you can purge them all by highlighting the line and hitting
"_g" (...and sanity-check what it says it's about to do, then...) "g".
I'm an actual aptitude user, and pretty much the only time I've used
the TUI is when the release notes force me into it. I find working
in the TUI awkward and have had difficulty understanding what I'm
looking at and what will happen.
For things that the apt commandline can also do, I've never quite
understood why anyone would bother typing in the extra "itude". To
me, the thing that makes aptitude worth having is the TUI: it gives an
overview of what you've got installed, it makes it easy to find new
things to install, and most important of all it makes it possible to
get into arguments with the package management system when the
dependencies on some trivial utility expect you to want to install a
whole desktop environment. That's not going to be everybody's cup of
tea, but in the case of checking for obsolete packages all they need
to do is open the TUI and see if the category exists.
Post by Karl O. Pinc
Anyway, I think giving command lines results in shorter and more
clear documentation.
I can't argue with the "shorter" part.
Post by Karl O. Pinc
Post by Justin B Rye
("Obsolete" can be a confusing term; what aptitude means by it is "any
installed package which is not available in any version from any
[known] archive". So if you grab a single .deb out of experimental,
that'll count as "obsolete"; if you create a local repository full of
linux-1.0 kernel-packages, those won't. But if you aren't
deliberately doing anything funny like that, the things that will
naturally end up in this category are the packages you installed in
an earlier release that aren't in the current release.)
Maybe it should be something like
<para>
Some package management front-ends provide easy ways of finding
installed packages that are no longer available from any known
repository. The <command>aptitude</command> text user interface lists
them in the category <quote>Obsolete and Locally Created
Packages</quote>, and they can be listed and purged from the
commandline with: </para>
<screen>
$ aptitude search '~o'
$ sudo aptitude purge '~o'
</screen>
I'm ok with that. In fact I like it. But I do have some comment.
First I don't like having sudo appear in commands, mostly because
it's not installed by default.
(Only in some senses of "by default". Most desktops seem to pull in
things that depend on sudo unless you're actively working towards a
lightweight install - which is another of those things I'd hate to
have to do without the aptitude TUI!)

Nitpicks aside, yes, it's worth avoiding if possible.
Post by Karl O. Pinc
Sure, it's a clear indicator that
you need to be root, and that's nice. But there are pluses and
minuses to sudo and it is not necessarily for everybody.
True; it might be better to separate them into two separate
<screen></screen> blocks. To me, putting them in one block implies
you could cut&paste them both together.
Post by Karl O. Pinc
More significantly perhaps, it's really nice to be able to cut
and paste commands directly from the documentation. The appearance
of both sudo and a shell prompt character prevents this.
<screen>
aptitude search '~o' ;# Works when not root
aptitude purge '~o' ;# Requires root
</screen>
(No need for the semicolons.)
Post by Karl O. Pinc
I'm not arguing hard here. This is a larger question
that requires consistency throughout the documentation.
I'm putting it forward here so people can think about it
and maybe the issues can be considered and consensus reached
in the future.
The convention of using a leading shell prompt to distinguish commands
that do or don't need root privileges does occur elsewhere in the
release notes, but now I look at them I see there are plenty of cases
where commands that would work for ordinary users are given a leading
hash, so we should probably just do the same here, as you originally
had it.

In fact I notice that <section id="purge-removed-packages"> in
upgrading.dbk has another instance of this same problem:

<para>
If you use <systemitem role="package">aptitude</systemitem>, you
can also use the following alternative to the commands above:
</para>
<screen>
$ aptitude search '~c'
$ aptitude purge '~c'
</screen>

where that second line *shouldn't* start with a "$".
--
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package
Karl O. Pinc
2019-05-15 15:50:02 UTC
Permalink
Quick Summary: Sounds good to me. Go for it.

On Wed, 15 May 2019 15:39:54 +0100
Post by Justin B Rye
For things that the apt commandline can also do, I've never quite
understood why anyone would bother typing in the extra "itude".
I can only give you my story.

I chose aptitude ages ago for several reasons. At the time
it had a better dependency resolution than apt-get. I don't
even recall apt existing, or maybe it did but didn't do much.
I like that "aptitude remove" also removes dependent packages
not otherwise required. It also seemed to be more of a
one-stop-shop, so once I know how to search I can use the
same search to install/purge/etc. Little need to go messing
around with apt-cache or other tools because of the search
capabilities.

(It would be cool if there was a way to also automatically
remove packages installed because they were "recommended",
but nothing recommends them any longer.)

I took a quick look at apt, found the search output way
too verbose and unable to be quickly scanned, and
decided it was easier to stick with aptitude.
Post by Justin B Rye
To
me, the thing that makes aptitude worth having is the TUI: it gives an
overview of what you've got installed, it makes it easy to find new
things to install, and most important of all it makes it possible to
get into arguments with the package management system when the
dependencies on some trivial utility expect you to want to install a
whole desktop environment. That's not going to be everybody's cup of
tea, but in the case of checking for obsolete packages all they need
to do is open the TUI and see if the category exists.
Well, you need to see if it exists and if it does you need to
look at what's in the category and _do_ something. Even looking
at what's there, iirc expanding the section(s?), involves
cognitive overhead.

The trouble with the TUI is you have to learn how to use it. Not
that hard, but one more thing that's different from every other
interface. And the single letter commands spook me. Once the
cat steps on the keyboard you don't know what happened to your
system. Interpreting what you're looking at is also non-trivial
to the uninitiated. What's hidden, what's not, what sections
you're looking at and what you need to look for, etc.
I recall being vexed by having to expand sub-sections individually
to see what I'm doing. I don't know how to avoid the statefull-ness
of pending actions but they also add stress. How can you
be sure that you didn't leave some pending actions laying
around some time ago that will now break things when you
effectuate your new changes? In the end, the TUI does not impress.
I don't know that it's feasible but I'd be much more comfortable
with a dialog style interface.

I generally don't have the confidence to want to argue with
package dependencies.
Post by Justin B Rye
Post by Karl O. Pinc
Post by Justin B Rye
Maybe it should be something like
<para>
Some package management front-ends provide easy ways of
finding installed packages that are no longer available from any
known repository. The <command>aptitude</command> text user
interface lists them in the category <quote>Obsolete and Locally
Created Packages</quote>, and they can be listed and purged from
the commandline with: </para>
<screen>
$ aptitude search '~o'
$ sudo aptitude purge '~o'
</screen>
I'm ok with that. In fact I like it. But I do have some comment.
Sure, it's a clear indicator that
you need to be root, and that's nice. But there are pluses and
minuses to sudo and it is not necessarily for everybody.
True; it might be better to separate them into two separate
<screen></screen> blocks. To me, putting them in one block implies
you could cut&paste them both together.
I agree this is an issue.

But once they are in separate screen blocks you almost have
to put some explanatory text in between the blocks. This lets
you talk about whether root is required but also adds
to visual bloat and consequent intimidation.

Somewhere there's a balance between clarity and brevity and I don't
know where you want to strike it.
Post by Justin B Rye
Post by Karl O. Pinc
More significantly perhaps, it's really nice to be able to cut
and paste commands directly from the documentation. The appearance
of both sudo and a shell prompt character prevents this.
<screen>
aptitude search '~o' ;# Works when not root
aptitude purge '~o' ;# Requires root
</screen>
(No need for the semicolons.)
Post by Karl O. Pinc
I'm not arguing hard here. This is a larger question
that requires consistency throughout the documentation.
I'm putting it forward here so people can think about it
and maybe the issues can be considered and consensus reached
in the future.
The convention of using a leading shell prompt to distinguish commands
that do or don't need root privileges does occur elsewhere in the
release notes, but now I look at them I see there are plenty of cases
where commands that would work for ordinary users are given a leading
hash, so we should probably just do the same here, as you originally
had it.
I have no strong preference.
Post by Justin B Rye
In fact I notice that <section id="purge-removed-packages"> in
<para>
If you use <systemitem role="package">aptitude</systemitem>,
</para>
<screen>
$ aptitude search '~c'
$ aptitude purge '~c'
</screen>
where that second line *shouldn't* start with a "$".
I noticed this once upon a time, probably when upgrading to stretch,
didn't report it, and forget about it. Good catch.

Regards,

Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Justin B Rye
2019-05-15 21:30:01 UTC
Permalink
Post by Karl O. Pinc
I can only give you my story.
I chose aptitude ages ago for several reasons. At the time
it had a better dependency resolution than apt-get. I don't
even recall apt existing, or maybe it did but didn't do much.
/usr/bin/apt is recent enough that we've only just got the
release-notes consistently mentioning it.
Post by Karl O. Pinc
I like that "aptitude remove" also removes dependent packages
not otherwise required. It also seemed to be more of a
one-stop-shop, so once I know how to search I can use the
same search to install/purge/etc. Little need to go messing
around with apt-cache or other tools because of the search
capabilities.
(It would be cool if there was a way to also automatically
remove packages installed because they were "recommended",
but nothing recommends them any longer.)
I suspect a sufficient suppy of "aptitude search '?for x:'" logic
would work, but you run into all the complications of dependencies via
virtual packages, essential packages, and so on. The most complex I'm
prepared to try is

aptitude search '?for x: ?x:installed ?x:automatic
?x:provides(?virtual ?reverse-depends(?installed))
?not(?x:reverse-depends(?installed(?depends(?=x))))'

(which finds a lot of things held in by tenuous dependency chains),
but if the idea is to ignore "recommends/suggests" then it might be
easier to go via "aptitude -Ro APT::Install-Suggests=0".
Post by Karl O. Pinc
I took a quick look at apt, found the search output way
too verbose and unable to be quickly scanned, and
decided it was easier to stick with aptitude.
And if you try to feed its output through grep, it nags at you on
stderr. (In fact that's why the release-notes still mention apt-cache
instead of converting all those references to apt as well.)

[...]
Post by Karl O. Pinc
The trouble with the TUI is you have to learn how to use it.
You have to bear in mind that I was coming to it from dselect.

Okay, so now that I get round to trying to produce a patch I see that
there's already text under "Preparing for the next release" that
covers what you had in your first paragraph:

<para>
Remove newly redundant or obsolete packages as described in
<xref linkend="sufficient-space"/> and <xref linkend="obsolete"/>.
You should review which configuration files they use and consider purging
the packages to remove their configuration files. See also
<xref linkend="purge-removed-packages" />.
</para>

But then the rest modifies material under "Obsolete packages".
--
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package
Karl O. Pinc
2019-05-15 21:50:01 UTC
Permalink
On Wed, 15 May 2019 22:17:10 +0100
Post by Justin B Rye
Post by Karl O. Pinc
I like that "aptitude remove" also removes dependent packages
not otherwise required. It also seemed to be more of a
one-stop-shop, so once I know how to search I can use the
same search to install/purge/etc. Little need to go messing
around with apt-cache or other tools because of the search
capabilities.
(It would be cool if there was a way to also automatically
remove packages installed because they were "recommended",
but nothing recommends them any longer.)
I suspect a sufficient suppy of "aptitude search '?for x:'" logic
would work, but you run into all the complications of dependencies via
virtual packages, essential packages, and so on. The most complex I'm
prepared to try is
aptitude search '?for x: ?x:installed ?x:automatic
?x:provides(?virtual ?reverse-depends(?installed))
?not(?x:reverse-depends(?installed(?depends(?=x))))'
(which finds a lot of things held in by tenuous dependency chains),
but if the idea is to ignore "recommends/suggests" then it might be
easier to go via "aptitude -Ro APT::Install-Suggests=0".
I happy to install suggests, but it'd be nice to have the
suggests go away when I decide to remove the package that
caused them to be suggested.
Post by Justin B Rye
Post by Karl O. Pinc
The trouble with the TUI is you have to learn how to use it.
You have to bear in mind that I was coming to it from dselect.
The aptitude curses interface is clearly dselect compatible. :)
Post by Justin B Rye
Okay, so now that I get round to trying to produce a patch I see that
there's already text under "Preparing for the next release" that
<para>
Remove newly redundant or obsolete packages as described in
<xref linkend="sufficient-space"/> and <xref
linkend="obsolete"/>. You should review which configuration files
they use and consider purging the packages to remove their
configuration files. See also <xref
linkend="purge-removed-packages" />. </para>
Yes. But you do "Preparing for the next release" _after_ upgrade.
My suggestion is to _also_ tell people to get rid of obsolete
packages before they start to upgrade.

Once people upgrade they often don't prepare for the next release;
having gotten something working there's little reason to prepare
for the next release until the next release comes around. But
when there's a new release we don't tell people "go read the section
in your current release's release notes on preparing for the next
release and _then_ go read the release notes for the current release".

People should be able to just read the release notes for the new
release and follow only the instructions involving what it takes
to upgrade to that release. Surely removing leftover crud from
past upgrades should be part of what it takes to upgrade. (And
if people are too lazy to "finish", that's on them.)

Maybe the problem is in the title "Preparing for the next release"
because it's really about cleaning up after the previous release.
Even so, the instructions should allow for people who are untidy
for whatever reason. (And it's theoretically possible that
obsolete packages would disturb the upgrade process, yes?)
It seems worth an extra sentence.

Regards,

Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Justin B Rye
2019-05-15 22:10:01 UTC
Permalink
Post by Karl O. Pinc
Yes. But you do "Preparing for the next release" _after_ upgrade.
My suggestion is to _also_ tell people to get rid of obsolete
packages before they start to upgrade.
Ah, now I see where it fits. Okay, revised patch.
Post by Karl O. Pinc
Maybe the problem is in the title "Preparing for the next release"
because it's really about cleaning up after the previous release.
Even so, the instructions should allow for people who are untidy
for whatever reason. (And it's theoretically possible that
obsolete packages would disturb the upgrade process, yes?)
It seems worth an extra sentence.
Yes, there's no guarantee that the packagename won't have been grabbed
by some completely different piece of software - see for instance the
case of the name "chromium", which was a game in Lenny, left unused in
Squeeze, and a web browser in Wheezy.
--
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package
Karl O. Pinc
2019-05-16 00:30:01 UTC
Permalink
On Wed, 15 May 2019 23:05:29 +0100
Post by Justin B Rye
Post by Karl O. Pinc
Yes. But you do "Preparing for the next release" _after_ upgrade.
My suggestion is to _also_ tell people to get rid of obsolete
packages before they start to upgrade.
Ah, now I see where it fits. Okay, revised patch.
Your patch is fine. Attached is an alternate patch with
a tweak the "text user interface" phrase to "textual
user interface" so as to be more recognizably
analogous with "graphical user interface".

Regards,

Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Debian Bug Tracking System
2019-06-01 20:00:01 UTC
Permalink
Your message dated Sat, 1 Jun 2019 21:48:15 +0200
with message-id <9ff151a6-eec4-11a2-95a8-***@debian.org>
and subject line Re: Bug#929003: release-notes: Provide specific instructions to remove obsolete packages
has caused the Debian Bug report #929003,
regarding release-notes: Provide specific instructions to remove obsolete packages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
929003: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929003
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...