Yum Install Error – Insufficient space in download directory [Solved]

Question: Hi, I was using ‘yum‘ command to install ‘lshw‘ package on CentOS virtual machine. Unfortunately, the command failed with an error message as “lshw-B.02.17-3.el6.x86_64: Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages“. Below is the snapshot of the complete error:

[root@sandy ~]# yum install lshw
lshw x86_64 B.02.17-3.el6 base 253 k
Error Downloading Packages:
lshw-B.02.17-3.el6.x86_64: Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
* free 0
* needed 253 k

Any suggestion would be appreciated? – Sandy

yum install cache error


Sandy, the error message gives a hint with stats as ‘free 0’, which means you are running out of disk space and it needs at least ‘253k’ to install the package.

Check disk space using ‘df -h‘ command.

In case, if you see an output similar to the one shown below, then you should try to free up some space under ‘/’ partition.

/dev/sda1  4.9G  4.8G 0 100% /

Assume, you have enough space on another partition, then you can change ‘cachedir‘ directory in yum.conf. See below e.g.,

# vi /etc/yum.conf

That’s it!

Note: However, you should try to clean up some space in ‘/’ partition 🙂

Do you want us to solve your linux errors? Quickly shoot a mail to us via Contact Us page.

Updated on September 3, 2017

Was this article helpful?

Related Articles

Leave a Comment