Tag Archives: yum

How to remove duplicate packages with yum

I’m working on a handful of servers that all have the same problem: when running yum, an error message appears that tells me a package called ntpupdate needs to be upgraded, but somehow this doesn’t work and the package is being skipped. Then follows a huge list of duplicate packages that are installed on those systems (probably installed by the automatic package updater within Plesk).

Let’s see how we can fix such issues. Continue reading How to remove duplicate packages with yum

How to fix duplicate packages in yum

From time to time, the yum package manager may encounter issues with duplicate packages that are erroneously installed on a system. This manifests in a yum update going awry, telling us something along the lines of this:

You may at times install all other packages via yum update –skip-broken, but it will still leave some trouble on the system. Best to take care of it.

Here’s how I’ve managed to do it on many occasions:
Continue reading How to fix duplicate packages in yum

How to find which package provides a command in yum

CentOS-LogoSometimes you know you need a package, but when you try to install it with yum you’ll get a message like “No matches found”. Yet you’re sure the package exists because you’ve used it before.

This can happen if the package in question is part of a set which installs multiple packages. The net-tools package springs to mind.

yum has a great option called whatprovides with which you can query what package you need to install to use a command. Let’s try it out!

Say I wanted to install mkfs.vfat which is not installed by default in CentOS. Simply trying to install it won’t work:

Of course it won’t. But I can ask yum what provides this package:

Well fantastic! The package I’m looking for is called dosfstools. Knowing that, I can simply use yum install dosfstools, and a few moments later mkfs.vfat will work as expected.

Thanks, yum!

How to fix yum update failure blaming “qpid-cpp”

I’ve just tried to update one of my CentOS 6.2 servers that was built from an older AMI, only to find that the yum update command stopped unexpectedly with several dependency errors. They all pointed to something called “qpid”, and I must admit that I’ve never heard of it – nor did I know that it was installed.

The long list ended with the following suggestion:

And why not indeed, since yum is so nice to give us suggestions. I’ve tired running “yum update –skip-broken” and got the following message:

Looks like this didn’t quite work either.

Let’s see how to fix this

How to list installed packages on CentOS

yum can help us here. This should do the trick:

If you’re interested in a particular package, you can pipe a search string into grep and only list filtered results:

The search string doesn’t even need to be in quotes, and partials work fine too.

How to use yum-complete-transaction

Tux-says-YUMEvery once in a while it can happen happen that use use “yum update” to update your Linux system.

Usually this works without a hitch, but you may have come across a message such as this:

Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.

But what does this mean, and how do we alleviate this?

Continue reading How to use yum-complete-transaction