legacy-wiki
Remove recently installed rpms
Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.
Find out what rpms were recently installed
Here it is skype and the ones after skype that I installed that I want to remove. (skype rpm was 32 bit and I didn’t have any of the 32 bit libs it needed so was slowly adding each library it complained about when trying to start it. Finally I got fed up and wanted to remove it..)
[john@farina ~]$ sudo tail /var/log/messages -n 100 | grep Installed
Dec 7 21:44:29 farina yum[2124]: Installed: 1:kmod-nvidia-2.6.35.9-64.fc14.x86_64-260.19.21-1.fc14.1.x86_64
Dec 7 21:44:30 farina yum[2124]: Installed: 1:xorg-x11-drv-nvidia-260.19.21-1.fc14.x86_64
Dec 7 21:44:33 farina yum[2124]: Installed: 1:xorg-x11-drv-nvidia-libs-260.19.21-1.fc14.x86_64
Dec 7 21:44:33 farina yum[2124]: Installed: 1:kmod-nvidia-260.19.21-1.fc14.1.x86_64
Dec 7 23:46:47 farina yum[4470]: Installed: skype-2.1.0.81-fc10.i586
Dec 7 23:50:11 farina yum[4518]: Installed: nss-softokn-freebl-3.12.8-1.fc14.i686
Dec 7 23:50:14 farina yum[4518]: Installed: glibc-2.12.90-19.i686
Dec 7 23:51:51 farina yum[4537]: Installed: libgcc-4.5.1-4.fc14.i686
Dec 7 23:51:52 farina yum[4537]: Installed: alsa-lib-1.0.23-2.fc14.i686
Dec 7 23:54:48 farina yum[4576]: Installed: libXau-1.0.6-1.fc14.i686
Dec 7 23:54:49 farina yum[4576]: Installed: libxcb-1.7-1.fc14.i686
Dec 7 23:54:50 farina yum[4576]: Installed: libX11-1.3.4-3.fc14.i686
Dec 7 23:54:50 farina yum[4576]: Installed: libXext-1.1.2-2.fc14.i686
Dec 7 23:54:51 farina yum[4576]: Installed: libXv-1.0.5-1.fc13.i686
Use awk to print out only rpm name
[john@farina ~]$ sudo tail /var/log/messages -n 100 | grep Installed | awk '{print $7}'
1:kmod-nvidia-2.6.35.9-64.fc14.x86_64-260.19.21-1.fc14.1.x86_64
1:xorg-x11-drv-nvidia-260.19.21-1.fc14.x86_64
1:xorg-x11-drv-nvidia-libs-260.19.21-1.fc14.x86_64
1:kmod-nvidia-260.19.21-1.fc14.1.x86_64
skype-2.1.0.81-fc10.i586
nss-softokn-freebl-3.12.8-1.fc14.i686
glibc-2.12.90-19.i686
libgcc-4.5.1-4.fc14.i686
alsa-lib-1.0.23-2.fc14.i686
libXau-1.0.6-1.fc14.i686
libxcb-1.7-1.fc14.i686
libX11-1.3.4-3.fc14.i686
libXext-1.1.2-2.fc14.i686
libXv-1.0.5-1.fc13.i686
Use xargs to remove line breaks
- this allows for easy copy/paste to the end of ‘yum erase $packages’
[john@farina ~]$ sudo tail /var/log/messages -n 100 | grep Installed | awk '{print $7}' | xargs
1:kmod-nvidia-2.6.35.9-64.fc14.x86_64-260.19.21-1.fc14.1.x86_64 1:xorg-x11-drv-nvidia-260.19.21-1.fc14.x86_64 1:xorg-x11-drv-nvidia-libs-260.19.21-1.fc14.x86_64 1:kmod-nvidia-260.19.21-1.fc14.1.x86_64 skype-2.1.0.81-fc10.i586 nss-softokn-freebl-3.12.8-1.fc14.i686 glibc-2.12.90-19.i686 libgcc-4.5.1-4.fc14.i686 alsa-lib-1.0.23-2.fc14.i686 libXau-1.0.6-1.fc14.i686 libxcb-1.7-1.fc14.i686 libX11-1.3.4-3.fc14.i686 libXext-1.1.2-2.fc14.i686 libXv-1.0.5-1.fc13.i686
I don’t want to remove nvidia just skype and everything after it so I just copy from skype onward and paste that at the end of ‘yum erase ’ and hit enter
copy paste package names into ‘yum erase ’ command
[john@farina ~]$ sudo yum erase skype-2.1.0.81-fc10.i586 nss-softokn-freebl-3.12.8-1.fc14.i686 glibc-2.12.90-19.i686 libgcc-4.5.1-4.fc14.i686 alsa-lib-1.0.23-2.fc14.i686 libXau-1.0.6-1.fc14.i686 libxcb-1.7-1.fc14.i686 libX11-1.3.4-3.fc14.i686 libXext-1.1.2-2.fc14.i686 libXv-1.0.5-1.fc13.i686
snip long output from yum
Done!
I could have added a ‘grep -v nvidia’ in the last command before the awk to remove the nvidia references, but I didn’t at the time.