Ubuntu constantly complains about the lack of space. I clean the disks from Windows, and there it shows that all disks have at least 3GB of free space, but when I reboot into Ubuntu - again I write that there is no space.

  1. When I install something, copying the installation commands to the terminal, maybe after installation these files are not deleted? Where to find them?
  2. How to see which disk is installed on Ubunt itself? I put it for a long time and I don’t remember, so every time I have to restart to Windu and clean all the disks in a row (idiocy). Which of all Ubuntu is worth, I also do not remember, but version 15.

$ df Файл.система 1K-блоков Использовано Доступно Использовано% Cмонтировано в udev 4070464 0 4070464 0% /dev tmpfs 817508 9548 807960 2% /run /dev/sdb7 10025596 9390132 103140 99% / tmpfs 4087540 84 4087456 1% /dev/shm tmpfs 5120 4 5116 1% /run/lock tmpfs 4087540 0 4087540 0% /sys/fs/cgroup cgmfs 100 0 100 0% /run/cgmanager/fs tmpfs 817508 64 817444 1% /run/user/1000 
  • attach the df program output to the question. and let us know exactly what actions you take “Ubuntu constantly complains about the lack of space.” - aleksandr barakin
  • I added what the terminal produces (the one that is ctrl + alt + T) when entering the df command - if I understood you correctly. It complains when the system starts and then when applications are running - they say there is not enough space, etc. When 0 bytes starts to cut down the application. - lif3ar
  • one
    You obviously have a root packed. Need to clean. I usually in such cases do cd / && du * -sh (the command is not fast!) And see where the most places are. Then I go to the folder and again du * -sh . Usually I find the culprit quickly. Now they will say that it is possible to put various utilities to automate this, but ... our place is radically over. Nothing so easy to put. - KoVadim

1 answer 1

How to see which disk is installed on Ubunt itself?

Based on the output from the df program (see below), we can conclude that in your case, the 7th section on the second of block devices is used: sdb is the second, sda is the first.

restart to Windu and clean all drives in a row

if you have not taken a special measure, ms / windows will not see the contents of the file system on which you have the ubuntu distribution installed. For ms / windows, this section will look like “unknown” (I find it difficult to give a more precise definition due to the absence of ms / windows in the space available to me).


 $ df ... /dev/sdb7 10025596 9390132 103140 99% / ... 

The file system on the sdb7 partition is almost full. this is the only file system mounted from the block device partition. as the only one - it simplifies the task.


for starters, it is worth removing the files with packages downloaded to the cache:

 $ sudo apt-get clean 

if the result does not satisfy you, then it is necessary to analyze further where exactly the most significant “losses” are located. for example:

 $ sudo du -bd 1 / 2>/dev/null | grep -v 'sys\|proc' | sort -n 

A list of the form sorted by the first column will be displayed:

 количество-байт /каталог 

showing how many bytes are occupied by files in one or another directory.

You can continue research and deeper. for example, to see how much space files occupy in directories located inside, for example, the /home directory:

 $ sudo du -bd 1 /home 2>/dev/null | sort -n 

and even deeper inside the /home/ubuntu directory:

 $ sudo du -bd 1 /home/ubuntu 2>/dev/null | sort -n 

what to do with unnecessary files located in the home directory is generally understandable. but with the rest - everything is not so clear. simple and thoughtless deletion of files can lead to the inoperability of both individual programs and the entire system.

if any very large file belongs to the package you have installed and no longer needed, then you must, of course, not delete the file, but uninstall the package. To determine the ownership of a file / directory in a package (s), you can:

 $ dpkg -S /путь/к/файлу/или/каталогу 

You can uninstall the package like this:

 $ sudo apt-get remove имя-пакета 
  • Thank you, generally understood. Apparently 10GB under Ubuntu is not enough, because after $ sudo apt-get clean, only 2% was released, and all files in home look systemic (start with a dot). - lif3ar
  • one
    @ lif3ar, starting with the point are not “system” files / directories, but “hidden” (in quotes because by default they are not displayed by the programs intended for viewing files / directories). theoretically, you might have, for example, very “fat” logs ( /var/log ), but, most likely, you just installed a bunch of packages that you may not need now. and, yes, 10 gigabytes for a desktop in modern times is just a “weeping cat.” - aleksandr barakin