Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

im running into weird error when tried to yum remove some package from the system:

sudo yum remove evaluation-1.2-0.1122.noarch.rpm 
Loaded plugins: fastestmirror
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 276, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 107, in main
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1740, in doLock
    while not self._lock(lockfile, mypid, 0644):
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1810, in _lock
    os.write(fd, contents)
OSError: [Errno 28] No space left on device

i run the 'df -h' and got this:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             7.9G  7.9G     0 100% /
tmpfs                 7.8G     0  7.8G   0% /dev/shm
/dev/sda1              97M   37M   55M  41% /boot
/dev/sda5              83G  977M   78G   2% /workplace

seems to me still lots of space available.

ran 'df -i' and got:

 df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda3             524288   42146  482142    9% /
tmpfs                2041840       1 2041839    1% /dev/shm
/dev/sda1              25688      39   25649    1% /boot
/dev/sda5            5505024     229 5504795    1% /workplace

im not familiar with the linux system, any idea what might go wrong? Thanks

share|improve this question
add comment

migrated from stackoverflow.com Mar 30 '13 at 8:03

This question came from our site for professional and enthusiast programmers.

3 Answers

Look at your output. it clearly shows that there is 0% available space on SDA3 partition, mounted as "/". Theoretically if you create a single file which eats all space, it still does not use all available inodes for a filesystem. Use

du -sh /*

to find out which directory uses how much data. You may try fsck check of the filesystem structure, depending on type of filesystem ( probably ext3 or ext4 ). Once I had a situation, in which application ( specifically apache webserver ) was saying "no space left on device" when I tried to start it, while there was plenty of space, it turned out it was open semaphores ( ipcs / ipcrm ) or limit of permitted open files per process which caused such behaviour.

In modern systems, especially for desktop use, it doesn't make sense anymore to keep "/" or "/boot" on separate partitions, rather a few physical disks are combined in one partition using LVM and similar tools. Common problem with too small "/" is when logs ( usually /var/log or /var/adm/log ) are kept on "/", consume all space, and then you need to move them to "/work" or "/home" partition anyway, and you end up with root filesystem shared across many partitions nevertheless.

share|improve this answer
add comment

From the df-h output, you have no space left on your / or root partiton.

Filesystem Size Used Avail Use% Mounted on

dev/sda3 7.9G 7.9G 0 100% /

Run a command like du -hs / or du -hs /*/*/* to find directories containing large files or a command like find / -type f -size +500000k, replacing the 500000k with the file size threshold for individual files.

Once you identify the large directories or files on your file system, identify what they are and how big they are, when they were last modified and whether they can be compressed (using tar and gzip) or deleted using rm, in order to make more space free.

Then you should be able to run the yum command to uninstall a package without it not being able to write to disk due to lack of space.

share|improve this answer
add comment

This one is your problem:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             7.9G  7.9G     0 100% /

There is in fact no space left on the partition '/dev/sda3'

Having lots of space available on other partitions will not help if the space is needed exactly there.

share|improve this answer
add comment

Your Answer


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