LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2012, 06:07 PM   #1
epsilon72
Member
 
Registered: Mar 2007
Posts: 124

Rep: Reputation: 17
[SOLVED]List explicitly installed packages / Equivalent of Gentoo world file?


Hi, I'm a Gentoo user looking to learn more about Fedora.

Question: Can Fedora show you a list of packages that have been explicitly installed on the system? Such a list would not include packages that have been installed as dependencies of other packages.

In Gentoo, you can do this simply by taking a look at your /var/lib/portage/world file. (In a .deb based distro you can use aptitude search '~i !~M')

Here's a small snippet of mine, as an example. All of these have been explicitly installed by me:
Code:
sys-kernel/gentoo-sources
sys-power/cpufrequtils
sys-process/htop
sys-process/lsof
sys-process/vixie-cron
www-client/chromium
www-client/epiphany-extensions
www-client/firefox
www-client/links
www-client/opera
www-plugins/adobe-flash
x11-apps/mesa-progs
x11-apps/xclock
x11-base/xorg-x11
x11-drivers/nvidia-drivers
x11-misc/numlockx
x11-terms/xterm
So, can Fedora do the same thing with yum or rpm?

Last edited by epsilon72; 10-06-2012 at 01:07 AM.
 
Old 10-03-2012, 07:36 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi, Fedora uses thr RedHat Package manager, and has a database.

I'm not sure if

rpm -Va | grep (keyword) will be satisfactory to list new installs.

rpm has 9 attributes it uses to catagorise packages...
Quote:
Finally, every file installed by RPM is examined. No less than nine different attributes of each file can be checked. Here is the list of attributes:
Owner Group Mode MD5 Checksum Size Major Number Minor Number Symbolic Link String Modification Time
ref. http://www.rpm.org/max-rpm/ch-rpm-verify.html

http://www.rpm.org/max-rpm/s1-rpm-qu...y-queries.html, Finding Recently Installed Packages, Part 1 & 2, near bottom of page...

http://www.rpm.org/max-rpm/s1-rpm-ve...to-verify.html

With Mandriva I learned about msec, which uses sec-tool (available for Fedora) to verify and report on any changes to the filesystem and more. Have a look, I generally make between 60 and 80 changes when first configuring the program. Then I get reports on scans that run differently depending on Daily, weekly, monthly and Manual tests.
https://fedorahosted.org/sectool/wiki/WhySectool

Hope this helps.

edit,
you may set this up early, list the packages and sort a to z and redirect (print) to file
Code:
rpm -qa | sort | less > ~/fresh-rpm-installed-list-`date +%Y-%m-%d-%H`.txt
to compare with any new lists you generate in the future with diff (kdiff3).

Easy, huh?

Last edited by GlennsPref; 10-03-2012 at 07:42 PM. Reason: rpm -qa | sort | less
 
Old 10-03-2012, 08:42 PM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Here is yet another way to list packages...
Code:
rpm -qav --last
# query, all, verbose, list by date
dosen't answer this question,
Quote:
list of packages that have been explicitly installed on the system?
, but getting closer.

hth, Glenn
 
Old 10-06-2012, 01:07 AM   #4
epsilon72
Member
 
Registered: Mar 2007
Posts: 124

Original Poster
Rep: Reputation: 17
The folks at the fedora support forums were able to get this sorted out. There's three things you can use:

First and foremost, this perl script is awesome
Code:
#!/usr/bin/perl

my %out;
foreach (split(/\n/, `yumdb search command_line "*install*"`)) {
    if (/command_line =.*install (.*)/) {
        $out{$_} = 1 foreach split(/ /, $1);
    }
}
foreach (sort keys %out) {
    print "$_\n" if !/^-/;
}
You can also use the command
Code:
$ show-installed
Which is part of the yum-utils package (installed by default)

You can also use this command with slightly different output (shows the command line used but multiple packages per line)
Code:
yumdb search  command_line "*install*" | grep command_line | sort | uniq
 
1 members found this post helpful.
  


Reply



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
Gentoo: Masked packages during world update firefiber Linux - Newbie 3 10-03-2011 08:09 PM
[SOLVED] What program to list all installed packages in a text file and compare 2 lists tranduyhung Linux - Software 2 02-23-2011 06:37 AM
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 11:36 AM
Gentoo --update world packages blocked ToothlessRebel Linux - Distributions 6 03-17-2007 05:07 PM
How to list all installed packages? bp12345 Debian 2 08-15-2005 08:06 AM

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

All times are GMT -5. The time now is 04:09 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