PDA

View Full Version : Removing unneeded dependencies with yum



Finalzone
2nd May 2013, 09:06 PM
Missed the apt-get autoremove command? Yum can do it too with this simple line

yum autoremove.
Problem: that command is undocumented and a bug report is submitted:
https://bugzilla.redhat.com/show_bug.cgi?id=951839

lsatenstein
2nd May 2013, 09:39 PM
Yum is supposed to be replaced by dnf. dnf is in theory, object oriented. But the problem that I encountered with yum is that removing an application also removes all the dependencies. And often these dependencies are used by other applications.

Yum's SQLITE implementation needs a reference counter for dependencies. Then if all applications are installed via yum, you would be able to perform a yum autoremove

matthewjavelet
2nd May 2013, 10:48 PM
Cleaned up 202MB, good lookin' out :happy:

Demz3
3rd May 2013, 01:17 AM
thanks for the tip Luya

DBelton
3rd May 2013, 02:17 AM
Yum is supposed to be replaced by dnf. dnf is in theory, object oriented. But the problem that I encountered with yum is that removing an application also removes all the dependencies. And often these dependencies are used by other applications.

Yum's SQLITE implementation needs a reference counter for dependencies. Then if all applications are installed via yum, you would be able to perform a yum autoremove

As far as I am aware, there are no plans or mention of replacing yum with dnf. Dnf is just a fork of yum and using libsolv and hawkey , but it's not scheduled to replace yum.


I had never realized the autoremove command was there in yum.. Thanks! I checked it out on my F18 machine and it found 2 packages to remove.

Demz3
3rd May 2013, 02:29 AM
As far as I am aware, there are no plans or mention of replacing yum with dnf. Dnf is just a fork of yum and using libsolv and hawkey , but it's not scheduled to replace yum.


I had never realized the autoremove command was there in yum.. Thanks! I checked it out on my F18 machine and it found 2 packages to remove.

there will eventually be a schedule put in place to make dnf the default in Fedora once its finished an complete. if you follow the RPM Mailing list i think there worrking with libsolv inside this new RPM? ( i maybe mistaken about RPM & libsolv though ) my guess DNF will be named YUM-4.0.0 once its finished. they( Ales ) still needs to make a dnf plugin for Anaconda plus the rest he needs to do

https://github.com/akozumpl/dnf
https://github.com/openSUSE/libsolv
https://github.com/akozumpl/hawkey/wiki
http://lists.rpm.org/mailman/listinfo an read the RPM-maint list

Finalzone
3rd May 2013, 05:24 AM
Yum is supposed to be replaced by dnf. dnf is in theory, object oriented. But the problem that I encountered with yum is that removing an application also removes all the dependencies. And often these dependencies are used by other applications.
Yum has several ways to remove applications without the need to remove crucial dependencies. You can experiment with

yum remove-n <package> // I think that commandremove a package without its dependencies
yum remove-na <package>
yum remove-nevra

I don't know the meaning of remove-na and remove-nevra due to the lack of documentation inside man yum.

As pointed out, dnf is nothing more than yum experimental.

markdk
22nd November 2013, 07:32 AM
As always, take a backup first.

I tried this on my F19 desktop.
Yes it removed a lot of stuff. After rebooting the desktop had completely changed (no longer the F19 gnome desktop anyway) and some applications (for example VLC, rpmfusion version) would no longer work.

I assume it would work OK if no software had been installed from any source other than the Fedora repositories. Or pherhaps it was an issue as I upgraded the desktop from F17 rather than doing a fresh install.

But for me it resulted in needing a system restore, so backup first :-)

But certainly try it after backing up, it removed around 600 packages from my system and it still rebooted... but just with broken applications.

As mentioned in one of the earlier responses there not a lot of documentation in 'man yum' to say what the options are. But it certainly removes packages, some were still apparently needed.

hadrons123
22nd November 2013, 08:53 AM
I tried the fedora upgrade and failed mostly. Rarely had any kind of success. You have now 2 variable coming into play 'autoremove' and OS 'upgrade'. Hard to tell which one screwed you.