Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# yum install firefox
...
Resolving Dependencies
...
--> Finished Dependency Resolution
Dependencies Resolved
...
Transaction Summary
================================================================================================================================================================================
Install  1 Package (+47 Dependent packages)

So, then when I go to remove the temporary package, I now also need to remove all of the dependent packages that it just installed.  That can be a pain to do manually.

Here's Thankfully, YUM has a method I use to make this a bit simplerto remove the package and all of it's otherwise unused dependent packages:

Code Block
bash
TIMESTAMP=`tail -1 /var/log/yum.log | awk -F: '{ print $1 ":" $2 }' | sed s'/.$//'`
yum remove `grep "$TIMESTAMP" /var/log/yum.log | awk '{ print $5 }' | sed 's/\-[0-9].*$//g' | sed 's/^[0-9]://g'`

 

...

# yum autoremove firefox
...
Resolving Dependencies
...
--> Finished Dependency Resolution
Dependencies Resolved
...
Transaction Summary
================================================================================================================================================================================
Remove  1 Package (+47 Dependent packages)