-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2023-03-22 a las 15:33 +0100, Bengt Gördén escribió:
On 2023-03-22 14:17, Knurpht-openSUSE wrote:
This is the url for the zypper command "zypper lr -d"
https://paste.opensuse.org/pastes/7f631951c1b8 22 Repos ..... To be honest, that is a mess. At least remove the *Factory* repos, that said also look at all the other non-distro repos. Remove whatever holds packages that are in the distro repos, then run sudo zypper dup --allow-vendor-change. Create a btrfs snapshot before
Op woensdag 22 maart 2023 14:12:57 CET schreef Frank McCormick: performing the operation.
Frank,
As Knurpht says, it might be a good idea to go through your set of repos. I have a bunch of weird repos but I live with them and keep an eye on them. But I would suggest you start by checking how many installed packages you actually have in each of them. I made myself a small one-liner a few years ago to deal with that.
for i in `zypper --no-refresh lr -E | awk -F\| '{print $2}' | grep -v -e ^$ -e Alias`;do echo -n $i:\ ;zypper --no-refresh se --installed-only --repo $i | grep ^i| wc -l;done
Interesting concoction. cer@Telcontar:~> for i in `zypper --no-refresh lr -E | awk -F\| '{print $2}' | grep -v -e ^$ -e Alias`;do echo -n $i:\ ;zypper --no-refresh se --installed-only --repo $i | grep ^i| wc -l;done Ext_Packman: 159 LocalRPMs_15.2: 0 Local_RPMs: 3 OBS_Education: 1 OBS_Emulators_Wine: 3 OBS_Games: 10 OBS_Games_tools: 0 OBS_KDE3: 13 OBS_KDE_extra: 4 OBS_Science: 0 OBS_devel_languages_pascal: 8 OBS_devel_languages_perl: 15 OBS_graphics: 0 OBS_home_sbradnick: 0 OBS_network_utilities: 1 OBS_server_mail: 8 OBS_utilities: 6 X11_Pantheon_Apps: 3 devel_languages_nodejs: 1 devel_languages_python: 0 devel_languages_python_backports: 2 google-chrome: 1 opensuse-guide.org-repo: 1 repo-backports-update: 131 repo-non-oss: 4 repo-oss: 8713 repo-sle-update: 2341 repo-update: 31 repo-update-non-oss: 0 cer@Telcontar:~> So you produce a list of repos by aliases: zypper --no-refresh lr -E | awk -F\| '{print $2}' | grep -v -e ^$ -e Alias Then add a ": " cer@Telcontar:~> echo OBS_devel_languages_pascal | echo -n $i:\ ; repo-update-non-oss: cer@Telcontar:~> cer@Telcontar:~> Ah, print repo name without new line. Finally, generate list of packages from that repo: cer@Telcontar:~> echo -n "repo-update-non-oss: " ; zypper --no-refresh se --installed-only --repo OBS_devel_languages_pascal repo-update-non-oss: Loading repository data... Reading installed packages... S | Name | Summary | Type - ---+-----------------+------------------------------------------+-------- i+ | fpc | Free Pascal Compiler | package i+ | fpc-doc | Freepascal Compiler documentation | package i+ | fpc-examples | Freepascal Compiler examples | package i+ | fpc-src | Freepascal Compiler - sources | package i+ | lazarus | FreePascal RAD IDE and Component Library | package i+ | libQt5Pas-devel | Free Pascal interface to Qt5 | package i+ | libQt5Pas1 | Free Pascal interface to Qt5 | package i+ | peazip | Graphical file archiver | package cer@Telcontar:~> and a count of lines. (grep ^i| wc -l) Ah, grep of the letter 'i' at the start of the line. What I am interested in is in the list of packages by repo :-) I think can adapt that to a script to produce a number of files (named using the alias) with the list. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZBtX7Bwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVkTwAnRQ8ppQ0CPMpzzU9Rato 5IA5pBWxAJ94GG1X9s6pMLq+1twQmid2ZcoZRg== =DFGw -----END PGP SIGNATURE-----