LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   List all installed packages by user. (https://www.linuxquestions.org/questions/linux-newbie-8/list-all-installed-packages-by-user-4175524159/)

vipinsqa 11-03-2014 02:06 AM

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

vipinsqa 11-03-2014 03:24 AM

Anyone on this please?

eklavya 11-03-2014 04:16 AM

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.

sag47 11-03-2014 04:28 AM

The anaconda.ks file in the root user home directory also typically lists the initial install selections.

pan64 11-03-2014 04:34 AM

users are not allowed to install (but root)

vipinsqa 11-03-2014 04:45 AM

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.

eklavya 11-03-2014 04:55 AM

Your command line activity to install or remove a package.
Code:

yum history info '*'|grep 'Command Line'

sag47 11-03-2014 04:56 AM

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.

pan64 11-03-2014 04:58 AM

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.

vipinsqa 11-03-2014 04:59 AM

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

vipinsqa 11-03-2014 05:09 AM

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.

sag47 11-03-2014 05:40 PM

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.


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