Not enough space left in the hard drive. How to proceed?

16,962

I think, you have downloaded too much software in your Ubuntu. I suggest you to copy all of those packages in other partition of the disk or in a USB drive or DVD. Then use this command

 sudo apt-get clean

to clear the package cache. It will quickly give you some more space

As you are using Wubi to install Ubuntu, You may try these solution posted here:

Or you may try to move the Wubi installation to a larger partition with regular installation

Share:
16,962

Related videos on Youtube

Neston Marica
Author by

Neston Marica

Updated on September 18, 2022

Comments

  • Neston Marica
    Neston Marica over 1 year

    Where do I begin... I can hardly do anything on Ubuntu 12.04. I am very close to removing and returning to Windows. First I could not load it because the graphics appeared to be running low but somehow that stopped happening and I could log on. Now I can not download anything or I get this message

    Cannot write: No space left on device.

    I tried trouble shooting this issue but every time I try and fix the problem I am blocked by this message

    E: Write error - write (28: No space left on device)
    E: Can't mmap an empty file
    E: Failed to truncate file - ftruncate (9: Bad file descriptor)
    E: The package lists or status file could not be parsed or opened.
    $ OLD=$(ls -tr /boot/vmlinuz-* | head -n -2 | cut -d- -f2- | awk '{print "linux-image-" $0}')
    

    Ubuntu is also running incredibly slow and I cant get anything done! Please help this is driving me mad!

    • jokerdino
      jokerdino over 11 years
      Clearly, you are running out of space. Try adding more storage to the Ubuntu partition?
    • H.-Dirk Schmitt
      H.-Dirk Schmitt over 11 years
      Please post the relevant part of the output of df.
    • Mitch
      Mitch over 11 years
      Can you add the outcome of sudo fdisk -l?
  • Neston Marica
    Neston Marica over 11 years
    I have plenty of hard drive space Filesystem Size Used Avail Use% Mounted on /dev/loop0 17G 17G 0 100% / udev 1.9G 4.0K 1.9G 1% /dev tmpfs 772M 976K 771M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 276K 1.9G 1% /run/shm /dev/sda2 445G 103G 342G 24% /host /dev/sdc10 932G 82G 850G 9% /media/My Passport for Mac /dev/sdb1 466G 436G 30G 94% /media/FreeAgent GoFlex Drive So do I need to still tranfer any files to usb etc. And if I need to partition which is the best and safest way
  • Anwar
    Anwar over 11 years
    @jimbobjgr Are you using Ubuntu from Live CD? Anyway, having enough hard drive space doesn't matter here. Because Ubuntu uses it's own partition, not the entire hard drive
  • Neston Marica
    Neston Marica over 11 years
    I am not using from a cd I used the windows download wizard thingy. I think it must be something to do with the partition, but I am having difficulty getting my head around how it works and how I can fix it.
  • Anwar
    Anwar over 11 years
    @jimbobjgr Then you are stuck I think. You must extend the file which is holding the Ubuntu partition inside your windows partition. I'll try to update the answer with a solution, if I find one. Most probably, you may need to install Ubuntu again with larger space.
  • Neston Marica
    Neston Marica over 11 years
    ok, how has this happened? Surely when Ubuntu is installed it should automatically install with the right amount of space to function?
  • Anwar
    Anwar over 11 years
    @jimbobjgr I think, you downloaded huge amount to software and installed them. Also note, Wubi can't automatically know how much software you would install. You have to select the size during installation
  • Neston Marica
    Neston Marica over 11 years
    right but if I have an external hard drive and have been putting everything on it, shouldnt that have freed up the memory?
  • Anwar
    Anwar over 11 years
    It should free up the disc space a bit. But it really depends on the actual size of the disc. If you are happy with the solution, go for it.
  • Neston Marica
    Neston Marica over 11 years
    I mean thats what I have been doing . There shouldnt be much on my main memory.
  • January
    January over 11 years
    better yet, sudo apt-get clean
  • Neston Marica
    Neston Marica over 11 years
    Thanks for your help. I have decided to get rid of Ubuntu. It has created far to many hours of work and Ii hadnt any time to do any of my own work... I hope to see it improve and perhaps one day I will use it again as I like the Idea.