I have just successfully upgraded from Fedora 16 to Fedora 17 using the Preupgrade tool. One of the post-upgrade steps suggested here is to "remove unsupported packages".

The guide says to run package-cleanup --orphans to obtain a list of said packages and then yum remove each one.

Rather than blindly do this I thought I'd check to make sure that this wouldn't unintentionally remove any needed dependencies. For example, ModemManager- is the first package in the list. When I run:

yum remove ModemManager-

I see that it also wants to remove a number of dependencies that look like valid Fedora 17 packages:

 Package                     Arch     Version                       Repository    Size
 ModemManager                x86_64               @updates/16  952 k
Removing for dependencies:
 NetworkManager              x86_64   1:  @anaconda-0  6.7 M
 NetworkManager-gnome        x86_64   1:  @anaconda-0  1.3 M
 NetworkManager-openconnect  x86_64    @updates/16  274 k
 NetworkManager-openvpn      x86_64   1:            @anaconda-0  679 k
 NetworkManager-pptp         x86_64   1:            @anaconda-0  467 k
 NetworkManager-vpnc         x86_64   1:            @anaconda-0  474 k
 anaconda                    x86_64   17.29-1.fc17                  @anaconda-0   12 M
 evolution-NetworkManager    x86_64   3.4.1-2.fc17                  @anaconda-0   14 k

Transaction Summary
Remove  1 Package (+8 Dependent packages)

If I do yum list NetworkManager I see:

Installed Packages
NetworkManager.x86_64         1:        @anaconda-0
Available Packages
NetworkManager.x86_64         1:                    updates

I also notice that none of the dependencies listed by yum remove are in the orphaned package list.

  • Is it safe for me to go ahead and remove these "orphaned" packages?
  • Do I have to remove these orphaned packages (I'm not short on disk space)?

In this case it would be acceptable to use rpm to uninstall those packages

#rpm -e ModemManager- --nodeps

After you have removed all of the unwanted packages, clean up the rpm database with the following commands

#rm -f /var/lib/rpm/__db*
#rpm –rebuilddb
#yum clean all
#rm -rf /var/cache/yum 
#yum makecache 
  • Thanks. After adjusting my google-fu I found this: fedoraproject.org/wiki/How_to_use_PreUpgrade and this: fedorasolved.org/Members/fenris02/post_upgrade_cleanup which helped. I also discover that doing yum update right after the upgrade cleared out virtually all of the packages reported by package-cleanup --orphans.
    – Kev
    Nov 20 '12 at 23:31
  • 1
    @midnightsteel, yum erase package deletes the package and everything that depends on it, as it should. The --nodeps option to rpm tells it not to check for it, and recommending it to newbies is irresponsible. The steps to clean up the RPM database are completely unneeded.
    – vonbrand
    Jan 24 '13 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.