I have run into this problem two days ago. The OS warns me that root has limited
disk space; however this should not be the case since I have 3 separate logical partitions for Ubuntu. Also it allows me to click the button examine, but I am not able to locate the problem that way? What can I do and what is the remedy? Inform me if further information is required.
Thanks for your assistance
Can I somehow include /usr directory in another mount point or the partition for the home folder without risking losing my data?
The culprit seems to be the /usr directory. The problem occurred after a full TexLive LaTeX installation. The output of lsblk is as follows:
5 Answers
You can use the "Disk Usage Analyser" to see what is using all of your drive space.
- Open "Disk Usage Analyser" by searching for it in the Dash.
- Click on your root (
/) drive. - Wait for the graph at the right to stop displaying loading dots (it may take a while).
- You can now review which files are taking up the most space (You can just close the 'Permission denied' error if it appears).
- Hover your mouse over a sector to get the name of that folder and its size.
To delete the largest files/folders
After performing the above steps and with the file path to a larger file/folder which you want to delete, you can do the following:
- Only if the file is in your Home directory, you could just move it to an external hard drive (or delete it altogether if it's unimportant)
- If the file is not in your Home folder, you can take a guess at which package it belongs to and try
apt-get uninstallto remove that package (if you don't need it) - Anything else, please edit your question with the path to the file/folder which you'd like to delete. You should not randomly delete files which are not in your Home folder.
Mounting a separate partition on /usr
This would be my suggestion. Use the following instructions:
Install GParted using this command in a terminal:
sudo apt-get install gparted- Open GParted by searching for it in the dash.
- Locate a large partition (>100GB, I'd suggest
sda5) of which is mostly unused (<50% used) - Shrink this partition by 10GB (or 10000MB)
- Create a new logical
ext4partition taking up all of the free space. Open a root Nautilus window (be careful with this)
sudo -H nautilus- Copy the contents of the
/usrfolder (contents, not the folder itself) into the root of your newext4partition created above. Execute this command in a terminal, replacing
/dev/sda1with the partition identifier of your new partition created above:sudo blkid | grep '/dev/sda1' | grep -Po 'UUID="[^"]+"'- Copy the complete output of this command (should be similar to this:
UUID="X7X2X1X3-X573-4929-97XX-XX1514X31X7X")
- Copy the complete output of this command (should be similar to this:
Open the
/etc/fstabfile with this command:sudo -H gedit /etc/fstabPaste in it the following on it's own line, substituting your copied text in where necessary:
<PASTE_HERE> /usr ext4 errors=remount-ro 0 1- Reboot
The below steps are optional, but will delete redundant copies of the /usr folder still on your original / drive, freeing up space.
- Boot into a LiveCD/USB.
- Mount your original
/drive in Nautilus, and take a note of where it's mounted to. Open a root Nautilus window (be careful with this)
sudo -H nautilus- Navigate to your original
/drive (which you noted above) - Delete the contents of the
/usrfolder, not the folder itself but everything inside it. - Reboot.
Replies
Can the files outside the home directory not be copied to an external drive?
No, they can not. You should not manually delete (or move away) any files outside of your Home folder unless you (you yourself, not apt-get or similar) put them there.
Is having two mount point at the same logical partition possible?
No, that is not possible.
5To free up some space you may want to clean /var/log
I had once a error loop in a php app, and the apache log folder had a few GB.
2The root file system is located under /.
The message you are receiving tells you that the disk partition that is mounted on the root file system (/) has 533.9MB available. However, this does not include the other two partitions.
You can see more information about the partitions and their mount points by typing lsblk.
Boot the live cd and run gparted. Shrink your home partition to free up some space at the end, then copy the swap partition there, and delete the original swap partition, then expand your root partition into that free space.
2I've faced the same problem and when i run df -h
I found that /boot using 100% of it's space and that mainly because of i didn't remove old kernel versions!
To know your current Kernel version run uname -r and to check all installed kernel versions run dpkg --list 'linux-image*'
i have found a lot of kernel versions installed and that's why there was no space in my /boot directory! and thus i can't even install new updates from Software Updater.
You can remove kernel versions run sudo apt-get remove linux-image-VERSION
But By careful not to remove your current kernel version.
You can also Install Ubuntu Tweak and using it you can remove all your old kernel versions.
To install Ubuntu Tweak you can run the following commands:
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweakTo Open it simply type: ubuntu-tweak or ubuntu-tweak -f janitor To open janitor tab directly.
Here's all "askubuntu" pages that help you to do this ;) my thread.
What is the safest way to clean up /boot partition?
Is it safe to remove old kernels after installing the latest mainline?
How to run Ubuntu Tweak's janitor automatically?
This solution works with me :D
2