Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #262118 > unrolled thread
| Started by | Max Nikulin <manikulin@gmail.com> |
|---|---|
| First post | 2023-10-03 12:20 +0200 |
| Last post | 2023-10-05 11:00 +0200 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.debian.user
List packages from non-default repositories Max Nikulin <manikulin@gmail.com> - 2023-10-03 12:20 +0200
Re: List packages from non-default repositories Jörg-Volker Peetz <jvpeetz@web.de> - 2023-10-03 20:40 +0200
Re: List packages from non-default repositories Max Nikulin <manikulin@gmail.com> - 2023-10-04 04:30 +0200
Re: List packages from non-default repositories David Wright <deblis@lionunicorn.co.uk> - 2023-10-04 07:00 +0200
Re: List packages from non-default repositories Max Nikulin <manikulin@gmail.com> - 2023-10-04 10:10 +0200
Re: List packages from non-default repositories Jörg-Volker Peetz <jvpeetz@web.de> - 2023-10-04 10:50 +0200
Re: List packages from non-default repositories Max Nikulin <manikulin@gmail.com> - 2023-10-04 12:30 +0200
Re: List packages from non-default repositories Jörg-Volker Peetz <jvpeetz@web.de> - 2023-10-05 11:00 +0200
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2023-10-03 12:20 +0200 |
| Subject | List packages from non-default repositories |
| Message-ID | <HkKFr-devd-7@gated-at.bofh.it> |
Hi, What is the recommended way to find deb packages installed from repositories other than stable? My current variant is apt list '?narrow(~i, !~Astable|~Astable-backports|!~O^Debian$|~o|~c)' I can not say that I fully understand how apt-patterns(7) work, so I am afraid that I may miss some cases in the expression above. It sounds like a FAQ, but have not found a ready to use solution. A workaround is to remove extra repositories from sources.list and get the list by "apt list '~o'", however, I hope, it is not necessary. Reasons why I have added more repositories are described below. Till Firefox-115 appeared in bookworm, I had it installed from trixie. Fortunately it required just a few packages from testing, so it was safe. Now I want to be sure that I have reinstalled versions from stable for all of them. '~i~Atesting' gives a long list filled with false positives because currently most of packages have same versions in trixie and bookworm. In addition I have tried backports kernel to try if Intel wifi driver is better there. Actually I still have a couple of packages from trixie, but they have no binary dependencies.
[toc] | [next] | [standalone]
| From | Jörg-Volker Peetz <jvpeetz@web.de> |
|---|---|
| Date | 2023-10-03 20:40 +0200 |
| Message-ID | <HkStj-dj13-13@gated-at.bofh.it> |
| In reply to | #262118 |
Max Nikulin wrote on 03/10/2023 12:11: > apt list '?narrow(~i, !~Astable|~Astable-backports|!~O^Debian$|~o|~c)' In my experience the only tool that gives correct answers, is apt-show-versions in the package of the same name: $ apt-show-versions | grep -v '/stable ' Beware, that it works with a database which should be updated before asking something. Regards, Jörg.
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2023-10-04 04:30 +0200 |
| Message-ID | <HkZO9-dnXx-1@gated-at.bofh.it> |
| In reply to | #262130 |
On 04/10/2023 01:29, Jörg-Volker Peetz wrote: > Max Nikulin wrote on 03/10/2023 12:11: >> apt list '?narrow(~i, !~Astable|~Astable-backports|!~O^Debian$|~o|~c)' > > In my experience the only tool that gives correct answers, is > apt-show-versions in the package of the same name: > > $ apt-show-versions | grep -v '/stable ' Thanks. Do you have an example of a case when apt-show-versions works better when the following command? apt list '~i' | grep -Ev '[/,]stable(-updates|-security)?,' OK, it issues a warning WARNING: apt does not have a stable CLI interface. Use with caution in scripts. In my case apt list + grep gives the same packages as "apt list" with the pattern I posted.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2023-10-04 07:00 +0200 |
| Message-ID | <Hl29j-dpiz-5@gated-at.bofh.it> |
| In reply to | #262142 |
On Wed 04 Oct 2023 at 09:22:06 (+0700), Max Nikulin wrote: > On 04/10/2023 01:29, Jörg-Volker Peetz wrote: > > Max Nikulin wrote on 03/10/2023 12:11: > > > apt list '?narrow(~i, !~Astable|~Astable-backports|!~O^Debian$|~o|~c)' > > > > In my experience the only tool that gives correct answers, is > > apt-show-versions in the package of the same name: > > > > $ apt-show-versions | grep -v '/stable ' > > Thanks. > > Do you have an example of a case when apt-show-versions works better > when the following command? > > apt list '~i' | grep -Ev '[/,]stable(-updates|-security)?,' > > OK, it issues a warning > > WARNING: apt does not have a stable CLI interface. Use with caution in > scripts. > > In my case apt list + grep gives the same packages as "apt list" with > the pattern I posted. $ apt-show-versions | grep -v '/bullseye' linux-image-5.10.0-24-amd64:amd64 5.10.179-5 installed: No available version in archive xtoolwait:amd64 1.3-6.2 installed: No available version in archive youtube-dl:all 2021.12.17-1~bpo11+1 newer than version in archive yt-dlp:all 2023.07.06-1~bpo12+1 installed: No available version in archive $ apt list '~i' | grep -Ev '[/,]oldstable(-updates|-security)?,' WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Listing... linux-image-5.10.0-24-amd64/now 5.10.179-5 amd64 [installed,local] xtoolwait/now 1.3-6.2 amd64 [installed,local] youtube-dl/now 2021.12.17-1~bpo11+1 all [installed,local] yt-dlp/now 2023.07.06-1~bpo12+1 all [installed,local] $ So just a little more information in the first. Explanations for these hits: linux-image is the previous kernel, xtoolwait is from squeeze, youtube-dl is the last I found before I started using yt-dlp, and I don't have backports in my sources.list. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2023-10-04 10:10 +0200 |
| Message-ID | <Hl57b-dreu-3@gated-at.bofh.it> |
| In reply to | #262149 |
On 04/10/2023 11:58, David Wright wrote:
> Explanations for these hits:
> linux-image is the previous kernel,
> xtoolwait is from squeeze,
> youtube-dl is the last I found before I started using yt-dlp,
> and I don't have backports in my sources.list.
Besides youtube-dl, these packages should be reported by
apt list '~o'
In my cases '~o' was inapplicable since packages are available from
configured repositories. At certain moment (after reinstalling
libstdc++6 and removing gcc-13-base) my list was
elpa-org/testing,now 9.6.9+dfsg-1 all [installed]
libnss3/testing,now 2:3.92-1 amd64 [installed,automatic]
libx11-6/testing,now 2:1.8.6-1 amd64 [installed,automatic]
libx11-xcb1/testing,now 2:1.8.6-1 amd64 [installed,automatic]
linux-image-6.4.0-0.deb12.2-amd64/stable-backports,now
6.4.4-3~bpo12+1 amd64 [installed,automatic]
I have realized that in my original command '~o' may be omitted, '~c'
was added at a wrong place. In comparison to "apt list '~i'" or
apt-show-versions + grep it had additional feature (or bug). It listed
upgradable packages. So my current pattern to get package candidates for
clean-up is (for oldstable)
apt list '?narrow(~i,
!~A^oldstable|~A^oldstable-backports|!~O^Debian$, !~U) | ~c | ~b'
[toc] | [prev] | [next] | [standalone]
| From | Jörg-Volker Peetz <jvpeetz@web.de> |
|---|---|
| Date | 2023-10-04 10:50 +0200 |
| Message-ID | <Hl5JT-drqD-3@gated-at.bofh.it> |
| In reply to | #262142 |
Max Nikulin wrote on 04/10/2023 04:22: > On 04/10/2023 01:29, Jörg-Volker Peetz wrote: >> Max Nikulin wrote on 03/10/2023 12:11: >>> apt list '?narrow(~i, !~Astable|~Astable-backports|!~O^Debian$|~o|~c)' >> >> In my experience the only tool that gives correct answers, is >> apt-show-versions in the package of the same name: >> >> $ apt-show-versions | grep -v '/stable ' > > Thanks. > > Do you have an example of a case when apt-show-versions works better when the > following command? > > apt list '~i' | grep -Ev '[/,]stable(-updates|-security)?,' <snip> I have to add that I'm working on a system from the testing archive with unstable and experimental archives also available. Indeed the commands $ apt list '~i' | grep -v '/testing' and $ apt-show-versions | grep -v '/testing ' show the same packages, correctly, but $ apt list '~i!~Atesting' is missing some packages. Regards, Jörg.
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2023-10-04 12:30 +0200 |
| Message-ID | <Hl7iF-dsqP-1@gated-at.bofh.it> |
| In reply to | #262156 |
On 04/10/2023 15:42, Jörg-Volker Peetz wrote:
> $ apt list '~i' | grep -v '/testing'
>
> and
>
> $ apt-show-versions | grep -v '/testing '
>
> show the same packages, correctly, but
>
> $ apt list '~i!~Atesting'
>
> is missing some packages.
It is the reason why I added '?narrow'. Try
apt list '?any-version(~i!~A^testing)'
For me it is not intuitive that the outer '?any-version()' modifies
result of the inner '?and()'.
Actually the expression gives *some* upgradable packages in addition,
but not all of them. For the stable release installed libc6 version is
available from bookworm/main, but thunderbird-102 has been wiped from
bookworm-security, so
apt list '?narrow(~i, ~n"^(thunderbird|libc6)$", !~A^stable)'
Listing... Done
thunderbird/stable-security 1:115.3.1-1~deb12u1 amd64 [upgradable from:
1:102.15.1-1~deb12u1]
N: There are 3 additional versions. Please use the '-a' switch to see them.
skips libc6 however it can be upgraded
apt list '~U~n"^(thunderbird|libc6)$"'
Listing... Done
libc6/stable-security 2.36-9+deb12u3 amd64 [upgradable from: 2.36-9+deb12u1]
thunderbird/stable-security 1:115.3.1-1~deb12u1 amd64 [upgradable from:
1:102.15.1-1~deb12u1]
It took some time for me to figure out what is the difference.
apt policy libc6 thunderbird
libc6:
Installed: 2.36-9+deb12u1
Candidate: 2.36-9+deb12u3
Version table:
2.37-10 100
100 http://deb.debian.org/debian trixie/main amd64 Packages
2.36-9+deb12u3 500
500 http://security.debian.org/debian-security
bookworm-security/main amd64 Packages
*** 2.36-9+deb12u1 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
100 /var/lib/dpkg/status
thunderbird:
Installed: 1:102.15.1-1~deb12u1
Candidate: 1:115.3.1-1~deb12u1
Version table:
1:115.3.1-1~deb12u1 500
500 http://security.debian.org/debian-security
bookworm-security/main amd64 Packages
1:115.2.2-1 100
100 http://deb.debian.org/debian trixie/main amd64 Packages
*** 1:102.15.1-1~deb12u1 100
100 /var/lib/dpkg/status
1:102.13.0-1~deb12u1 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
So either ", !~U" should be added inside "?narrow()" or "| ~U" outside
of it, depending on desired result in respect to upgradable packages.
[toc] | [prev] | [next] | [standalone]
| From | Jörg-Volker Peetz <jvpeetz@web.de> |
|---|---|
| Date | 2023-10-05 11:00 +0200 |
| Message-ID | <Hlsn7-dG4H-7@gated-at.bofh.it> |
| In reply to | #262157 |
Thanks for the detailed inspection. I'll have a closer look into the apt abilities. Regards, Jörg.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web