PDA

View Full Version : how can i see what packages and repos i have installed



arshad3m
11th August 2008, 02:36 PM
hallo,
i want to see them from command prompt. not from the yum extender.
please help me

thank you.

markkuk
11th August 2008, 02:40 PM
yum list installed
yum repolist

arshad3m
11th August 2008, 02:47 PM
thank you. :D

PabloTwo
11th August 2008, 03:34 PM
To see installed packages, you could also do:

less /var/log/rpmpkgs

Makes viewing the long list more managable.

arshad3m
11th August 2008, 03:44 PM
ya. thank you. but what i really want is.
i istalled my f9 using live cd. but currently i have installed many repos and someother things to bring the system to the current position. (which i love very much). it took my a week or so to install those things. because i had to get the help of the forum members here.
since i cant remember what are the things i manually installed. i want to keep it noted. so incase of system loss i can reinstall f9 and install all the packages i am talking about within a day or so.

PabloTwo
11th August 2008, 04:49 PM
Everything you installed, and removed, with yum after your initial F9 install is recorded in yum log files

ls -l /var/log/yum.log*
There will be a current working 'yum.log' file and one or more 'yum.log-datestamp logs. Just backup those yum log files periodicaly to somewhere safe in case your system gets hosed beyond recovery. They will include all of the 'updated' package listings from your original install, but you can 'grep' for only 'installed' packages to filter the updates out

cat /var/log.yum | grep Installed
Note: yum log files do not keep entries for rpm packages you installed manually using the rpm command. For those, you should create a file to manally enter the package info for packages you installed using the rpm command.

arshad3m
11th August 2008, 04:53 PM
hallo,
how can i open the log file. this is what i get once i ran your code


[Arshad@localhost ~]$ ls -l /var/log/yum.log*
-rw-r--r-- 1 root root 35467 2008-08-11 10:35 /var/log/yum.log
[Arshad@localhost ~]$
[Arshad@localhost ~]$

PabloTwo
11th August 2008, 05:07 PM
You could view the log file with 'less' (command line)

less /var/log/yum.log
or open it with 'gedit' if you prefer a GUI text viewer.

gedit /var/log/yum.log
To sort out the "Installed" packages from the "Updated packages in the yum log file and put that information into another file

cat /var/log/yum.log | grep Installed > yum-installed
That will give a new file called 'yum-installed' in your current directory with only the yum installed packaged listed sans the updated packages.

arshad3m
11th August 2008, 05:33 PM
thank you thats what i wanted.

PabloTwo
11th August 2008, 05:56 PM
Glad to be of help. Just remember though, as your 'yum.log' file grows, at some point in time the current 'yum.log' will become 'yum.log-datestamp and a new 'yum.log' file will be created. If and when that happens, if you run the same command again

cat /var/log/yum.log | grep Installed > yum-installed

and the original 'yum-installed' file is still in your present working direcotry, it's contents will be overwritten. You could still retrieve the original information from the now 'yum.log-datestamp file, but you can append (add to) new information to the exisisting file by making the '>' in the command line '>>' (two >'s instead of one >).

cat /var/log/yum.log | grep Installed >> yum-installed

PabloTwo
11th August 2008, 06:16 PM
And, to add new information only to the existing 'yum-installed' file after you do some yum installing of new packages, you can do this (example assumes you yum installed some packages on todays date, August 11)

cat /var/log/yum.log | grep Installed | grep "Aug 11" >> yum-installed

It also assumes the date format in the yum.log file is as shown. Since you are in Sri Lanka, it could be differnet depending on your system settings. If it's different for you, then adjust the date format to it's actual form.

The above example should make it simple to keep your 'yum-installed' file up to date as you add additional packages via yum.

arshad3m
11th August 2008, 06:21 PM
thank you very much for you info. :) :)
really appriciated.