LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-06-2015, 09:54 PM   #1
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Rep: Reputation: 59
How to find all packages installed from repos other than Fedora


Hello All,
Whilst I am pretty sure that I know what I have built and installed locally, as well as packages from repos other than Fedora, it would be good to be able to find and confirm what they are.
Is there a dnf (or other) command that I can use to do this?

Cheers,
Terry
 
Old 10-07-2015, 04:26 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Not easy, as not all 3rd party packages are marked with <name> :
$ rpm -qa --last | grep name

Example : Rpmfusion, no markings ... but it's a short list, 502 packages :
http://download1.rpmfusion.org/free/...ing/x86_64/os/


? Which repo`s have you got : Please show the output from 'ls /etc/yum.repos.d/'



-
 
Old 10-07-2015, 07:56 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I would rather say you can list all of your packages and grep out the "official" ones (you can get the list of available packages of all your repos)
 
Old 10-07-2015, 04:27 PM   #4
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by pan64 View Post
I would rather say you can list all of your packages and grep out the "official" ones (you can get the list of available packages of all your repos)
OK, that may work but does seem like it might be a bit cumbersome. I'm not really sure how I would do that as yet.
Is there no way one can list packages installed from @commandline, to at least catch all the local builds?

Cheers,
Terry
 
Old 10-07-2015, 04:31 PM   #5
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by knudfl View Post
Not easy, as not all 3rd party packages are marked with <name> :
$ rpm -qa --last | grep name

Example : Rpmfusion, no markings ... but it's a short list, 502 packages :
http://download1.rpmfusion.org/free/...ing/x86_64/os/


? Which repo`s have you got : Please show the output from 'ls /etc/yum.repos.d/'
OK, here's what that says...
[terry@localhost ~]$ ls /etc/yum.repos.d/
adobe-linux-x86_64.repo rpmfusion-free-updates.repo
dropbox.repo rpmfusion-free-updates-testing.repo
fedora.repo rpmfusion-nonfree-rawhide.repo
fedora-updates.repo rpmfusion-nonfree.repo
fedora-updates-testing.repo rpmfusion-nonfree-updates.repo
ozonos.repo rpmfusion-nonfree-updates-testing.repo
rpmfusion-free-rawhide.repo vivaldi.repo
rpmfusion-free.repo


Cheers,
Terry
 
Old 10-07-2015, 05:32 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #5.

dropbox.repo :
https://linux.dropbox.com/fedora/22/x86_64/ >> two packages only. Marked dropbox.

rpmfusion-nonfree-rawhide.repo, rpmfusion-free-rawhide.repo :
Please disable. (enable=0) I.e. no rawhide packages should be used.

rpmfusion-free-updates.repo, rpmfusion-nonfree-updates.repo, rpmfusion-free.repo, rpmfusion-nonfree.repo: See post #2. And http://download1.rpmfusion.org/nonfr...ing/x86_64/os/
Updates nonfree http://download1.rpmfusion.org/nonfr...tes/22/x86_64/
Updates free http://download1.rpmfusion.org/free/...tes/22/x86_64/

rpmfusion-nonfree-updates-testing.repo, rpmfusion-free-updates-testing.repo : Use with care.

ozonos.repo : http://goodies.ozon-os.com/repo/ >> Repositories for Ozon OS. Not currenty available.

vivaldi.repo : http://repo.vivaldi.com/archive/rpm/x86_64/ >> vivaldi*.rpm only.


-

Last edited by knudfl; 10-07-2015 at 05:41 PM.
 
Old 10-07-2015, 06:28 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
OK, here's what that says...
[terry@localhost ~]$ ls /etc/yum.repos.d/
adobe-linux-x86_64.repo rpmfusion-free-updates.repo
dropbox.repo rpmfusion-free-updates-testing.repo
fedora.repo rpmfusion-nonfree-rawhide.repo
fedora-updates.repo rpmfusion-nonfree.repo
fedora-updates-testing.repo rpmfusion-nonfree-updates.repo
ozonos.repo rpmfusion-nonfree-updates-testing.repo
rpmfusion-free-rawhide.repo vivaldi.repo
rpmfusion-free.repo
that really dose not provide any information

as in it dose not provide if "rawhide" is on or off
that is a VERY !!! big deal !!!

nor dose it state the state of the thirda party repo "ozonos.repo" ( never herd of this one -it is new to me )

posting the output of this WOULD tell us a lot
Code:
su -
dnf repolist all
that will tell you if they are ON or OFF and HOW MANY packages are in those repos

but with rpmfusion being the only supported repo and really the only one one needs ( it is NOT!! incompatible with the base system)


the old and nolonger around "RPMforge" used .rf.rpm in the package name
that made it very easy to remove them
Code:
su -
rpm -qa | grep rf > rpmforgeLIST.txt
would give you a list

Last edited by John VV; 10-07-2015 at 06:30 PM.
 
Old 10-07-2015, 06:35 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Here's a script that uses awk to parse the output from "yum history pkg-info".
Code:
#!/bin/bash
if [ $# != 1 ]; then
    echo "Usage: ${0##*/} [!]reponame[,reponame...]" >&2
    exit 1
fi
yum history pkg-info \* | awk -v "Name=$1" '
     BEGIN {
	 if(substr(Name, 1, 1) == "!") {
	     NotRepo = 1
	     Name = substr(Name, 2)
	 }
	 split(Name, aa, ",")
	 for(n in aa) Names[aa[n]] = 1
     }
     /^Package / {
	 Pkg = substr($0, index($0, ":")+2)
     }
     /^State / {
	 State[Pkg] = substr($0, index($0, ":")+2)
     }
     /^From repo / {
	 Repo = substr($0, index($0, ":")+2)
	 if((Repo in Names)-NotRepo && Done[Pkg] == 0) {
	     if(State[Pkg] != "Erase" && State[Pkg] != "Updated") {
		 print Pkg, Repo, "(" State[Pkg] ")"
	     }
	     ++Done[Pkg]
	 }
     }
'
Example usage:
Code:
reposhow '!fedora,updates'
Shows all the packages from repos other than "fedora" or "updates". Assumes the script is named "reposhow", of course. The quotes are needed to get the exclamation point past the shell. It's just a quickie I've been using. I make no claims of robustness or portability.
 
Old 10-07-2015, 11:22 PM   #9
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by rknichols View Post
Here's a script that uses awk to parse the output from "yum history pkg-info".
Example usage:
Code:
reposhow '!fedora,updates'
Shows all the packages from repos other than "fedora" or "updates".
Doesn't work here on F22, here is the output from that script...

[terry@localhost ~]$ ./reposhow.sh '!fedora, updates'
Yum command has been deprecated, redirecting to '/usr/bin/dnf history pkg-info *'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Invalid history sub-command, use: list, info, redo, undo, rollback, userinstalled.

Cheers,
Terry
 
Old 10-07-2015, 11:23 PM   #10
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by John VV View Post
that really dose not provide any information

as in it dose not provide if "rawhide" is on or off
that is a VERY !!! big deal !!!

nor dose it state the state of the thirda party repo "ozonos.repo" ( never herd of this one -it is new to me )
I hope your not shouting at me John!

Cheers,
Terry
 
Old 10-08-2015, 03:09 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #7, John.
Quote:
the old and nolonger around "RPMforge"
New name = RepoForge http://repoforge.org/ "RepoForge is the new RPMforge."
 
Old 10-08-2015, 09:09 AM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by terry-duell View Post
Doesn't work here on F22, here is the output from that script...

[terry@localhost ~]$ ./reposhow.sh '!fedora, updates'
Yum command has been deprecated, redirecting to '/usr/bin/dnf history pkg-info *'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Invalid history sub-command, use: list, info, redo, undo, rollback, userinstalled.
As I said, no guarantee of portability. I've been using it with yum on CentOS. You would need to find a dnf equivalent for "yum history pkg-info" and probably adjust the awk script since the format of the output is likely to be different.
 
Old 10-10-2015, 04:53 PM   #13
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by rknichols View Post
As I said, no guarantee of portability. I've been using it with yum on CentOS. You would need to find a dnf equivalent for "yum history pkg-info" and probably adjust the awk script since the format of the output is likely to be different.
OK, thanks.
I'll just have to hope someone who knows can do that, as I have no idea.

Cheers,
Terry
 
Old 10-10-2015, 07:56 PM   #14
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
The dnf repository-packages command may do what you want. For example, to find all packages you installed from a repository, something like
<quote>dnf repository-packages google-chrome info installed</quote>
Change installed to available to see packages you haven't installed from the repository.
 
Old 10-11-2015, 01:05 AM   #15
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by Doug G View Post
The dnf repository-packages command may do what you want. For example, to find all packages you installed from a repository, something like
<quote>dnf repository-packages google-chrome info installed</quote>
Change installed to available to see packages you haven't installed from the repository.
Thanks for that.
If I use "sudo dnf repository-packages @commandline info installed"
it reports everything I've installed from local builds...just the thing to track them all down and prepare properly prior to running fedup.

Cheers,
Terry
 
  


Reply

Tags
rpm vendor list



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compare all installed packages with the repos they came from Ulysses_ Ubuntu 3 09-24-2015 03:09 PM
can't find most Libreoffice packages in repos newbiesforever VectorLinux 3 09-22-2012 04:01 PM
[SOLVED] how to find the list of installed packages? anand.arumug Linux - Newbie 6 01-12-2010 06:00 PM
Find location of packages previously installed with yum on fedora core 5 Tails and Link Linux - Newbie 8 04-30-2006 04:27 AM
Cannot Find Installed Packages cajunaggie Linux - Newbie 3 09-18-2004 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration