#990118 show packages that are not from the default release

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Simon Richter
Date:
2021-06-21 09:30:02 UTC
Severity:
wishlist
#990118#5
Date:
2021-06-21 08:59:46 UTC
From:
To:
Hi,

it would be nice if there was a way to find packages whose local version is
higher than the version from the archive that would be selected, possibly
as a new toplevel group "Downgradeable Packages".

Benefits:
 - quickly assessing whether unstable/experimental packages are installed.
 - making sure that the entire "Installed Packages" group can be
   reinstalled.

   Simon

#990118#10
Date:
2021-06-21 09:27:44 UTC
From:
To:
Hi Simon,

Simon Richter wrote:

Aptitude is quite flexible and this is already possible. :-)

My shell has the following alias (and there is the idea to put this
one and others as small scripts into the aptitude or an add-on
package):

alias aptitude-newer-than-in-archive='aptitude -o "Aptitude::Pkg-Display-Limit=~i ?any-version(!~O.) !~U !~o"'

Should be possible as well already. It might not be perfect yet, but I
have the following in my /etc/apt/apt.conf:

Aptitude::UI {
  Default-Grouping "pattern(~i ?any-version(!~O.) !~U !~o => Non-upgradable packages not from archive, ?true ||),filter(missing),status,section(subdir,passthrough),pattern(~O, !~O => other),pattern(~A, !~A => other),section(topdir),priority";
}

There's though a chance that this group then includes packages which
are actually upgradable, but just to packages where the repo or
package has a pinning lower than 100. IIRC there were cases where this
caught packages in cases like the pinning constellation mentionend
below or at least similar cases as the package with pinning below 100
are not considered for upgrading:

Pinning   Source      Package version
990       sid	      1.2.3
100	  local	      1.2.3+local        ← would match
 90	  autobuild   1.2.4~autobuild

No more sure. Worked good enough for me, so I use it that way for
years now. :-)

		Regards, Axel