LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2014, 03:06 AM   #1
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Rep: Reputation: Disabled
List all installed packages by user.


Hi All,

I am using "rpm -qa" to list all packages in Linux host. However, I just need the list of packages that have been installed by a user and not the default packages.

Can anyone please confirm how can I retrieve the same? Any option with rpm?

I am on:- CentOS release 6.3.

Thanks.
Regards,
Vipin Batra
 
Old 11-03-2014, 04:24 AM   #2
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Anyone on this please?
 
Old 11-03-2014, 05:16 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
All details are logged in the file /var/log/yum.log.

If a package needs supportive packages, they all will be listed in yum.log.
You can not expect that only main package should be listed.
May be supportive packages are not important for you but they are important in every manner.

Last edited by eklavya; 11-03-2014 at 06:06 AM.
 
Old 11-03-2014, 05:28 AM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,832
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
The anaconda.ks file in the root user home directory also typically lists the initial install selections.
 
Old 11-03-2014, 05:34 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
users are not allowed to install (but root)
 
1 members found this post helpful.
Old 11-03-2014, 05:45 AM   #6
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hi Sag47,

Sorry didn't get you actually. I need to know the command which would fetch all packages which were installed by a user (Not default packages) on Centos. I was using rpm -qa but that doesn't help as it lists all packages.
I also tried "yum list installed" but that too lists all packages.

I would need to know the list of packages which are only manually installed on the centos box.

Please help.

Regards.
 
Old 11-03-2014, 05:55 AM   #7
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
Your command line activity to install or remove a package.
Code:
yum history info '*'|grep 'Command Line'
 
Old 11-03-2014, 05:56 AM   #8
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,832
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
By knowing what was originally installed one can get the difference. In any case, I replied thinking you were simply trying to inventory. It seems you want to build other systems based on your current package selections. What is your end goal? Your question does not have a clear goal in mind. By providing what you're attempting to do as a whole you potentially let yourself receive a better process than what you're attempting step by step in your questions.
 
Old 11-03-2014, 05:58 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
and again, all the packages are installed by root. There is no such thing "manually" installed packages. All the packages are installed by invoking a package management tool (yum or rpm), but noone knows how (by script or by human beeing) were they invoked. It is not logged.
 
Old 11-03-2014, 05:59 AM   #10
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hi Eklavya,

I checked that log "/var/log/yum.log" but I believe it also lists all linux packages. I need the ones which are installed by a user on Centos and not a list of all packages installed. Would you be aware how can I fetch that?

Thanks.

Regards,
Vipin Batra
 
Old 11-03-2014, 06:09 AM   #11
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hi Sag47/Pan64,

The script which would give me a list of all installed packages on linux (installed by root), I need to run it on another number of servers provided by client in my environment. The output report needs to list all packages which were installed on the linux host i.e. centos and I don't want to report the packages which are default in linux.

Hence, my goal is to obtain a list of installed packages on linux (application packages) which were installed so that I can get the similar report for all other servers.

Hope this helps.

Regards.
 
Old 11-03-2014, 06:40 PM   #12
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,832
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
If that's what you're trying to do then it is better to install a configuration management solution to manage the packages across your systems. Some configuration management solutions include:
  • Salt stack
  • Ansible
  • CFEngine
  • Puppet
  • Chef

By using configuration management you can standardize on a base set of installed packages and then customize what gets installed after that. It would also serve as documentation for which systems have what packages installed. I'm more inclined to promote the right tool for the job.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 12:36 PM
Is there a list of all installed packages? AgentD Slackware 6 05-28-2008 02:36 AM
how to list packages installed? scuzzo84 Debian 8 01-17-2006 06:17 PM
List all packages installed by user BlueOrb Debian 2 06-21-2005 03:11 PM
list of installed packages jeff1500 Slackware 3 03-22-2004 05:52 PM


All times are GMT -5. The time now is 07:09 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration