If this error is encountered in CentOS install of Hortonworks via Ambari, then you will need to celan out your yum metadta cache. During its normal use yum creates a cache of metadata and packages. This cache can take up a lot of space. The yum clean command allows you to clean up these files. All the files yum clean will act on are normally stored in /var/cache/yum
yum clean all