Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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-0.5.3.96-1.fc16.x86_64 is the first package in the list. When I run:

yum remove ModemManager-0.5.3.96-1.fc16.x86_64

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

=======================================================================================
 Package                     Arch     Version                       Repository    Size
=======================================================================================
Removing:
 ModemManager                x86_64   0.5.3.96-1.fc16               @updates/16  952 k
Removing for dependencies:
 NetworkManager              x86_64   1:0.9.4.0-7.git20120403.fc17  @anaconda-0  6.7 M
 NetworkManager-gnome        x86_64   1:0.9.4.0-7.git20120403.fc17  @anaconda-0  1.3 M
 NetworkManager-openconnect  x86_64   0.9.4.0-7.git20120612.fc16    @updates/16  274 k
 NetworkManager-openvpn      x86_64   1:0.9.3.997-1.fc17            @anaconda-0  679 k
 NetworkManager-pptp         x86_64   1:0.9.3.997-1.fc17            @anaconda-0  467 k
 NetworkManager-vpnc         x86_64   1:0.9.3.997-1.fc17            @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:0.9.4.0-7.git20120403.fc17        @anaconda-0
Available Packages
NetworkManager.x86_64         1:0.9.6.4-1.fc17                    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)?
share|improve this question

1 Answer 1

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

#rpm -e ModemManager-0.5.3.96-1.fc16.x86_64 --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 
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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