Re: tip: automated way to delete duplicate rpms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I created a small script file called dupWithVersions with this in it

for pkg in `cat duplicates`; do
  rpm -q $pkg
done

Redirect the output to another file like this.  $dupWithVersions
>removeList

Great tip!  Might I add something.  Once you have a list of unique
files (unedited - full list of unique files) run a for loop using
those files for input (as above) but do a grep against the original
list of rpms, using the count option.  Then with a simple "if"
command, if the count is greater than 1, remove it.  Continue the for
loop.

That way the script automatically determines if there is more than one
version of an rpm installed and removes it.

Jacques B.

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux