réjean Posted July 11, 2017 Share Posted July 11, 2017 (edited) Hi, everyone. I haven't posted for quite awhile but have read many of the topics. It is true that I haven't played around with my dristros either, just using the ones I have and updating them regularly. A couple of days ago I got a message in Linux Mint telling me that my "/" is full. I don't really want to increase it's size because it might affect other distros so what would you suggest I do? When I try to see what's in it I get the following; " You do not have the permissions necessary to view the contents of "root".". Edited July 11, 2017 by réjean Quote Link to comment Share on other sites More sharing options...
ebrke Posted July 11, 2017 Share Posted July 11, 2017 " You do not have the permissions necessary to view the contents of "root"." Even from CLI as su or with sudo? 358GB and it's full? There must be something huge there. You could try running du -h / from CLI to see what's so big if you can figure out the permission issue. 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted July 11, 2017 Share Posted July 11, 2017 Rejean!!! You HAVE been missed! So good to see you! 1 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 11, 2017 Author Share Posted July 11, 2017 du -h/ from CLI to see what's so big if you can figure out the permission issue. The report doing "sudo du -h/" is about a mile long (seriously not that long but long) and all I see that's big is " 3.3G /lib" and near the end; 12K /etc/kbd 8.0K /etc/perl/Net 4.0K /etc/perl/CPAN 16K /etc/perl 4.0K /etc/apparmor/init/network-interface-security 8.0K /etc/apparmor/init 12K /etc/apparmor 4.0K /etc/opt 12K /etc/obex-data-server 8.0K /etc/pki/fwupd-metadata 12K /etc/pki/fwupd 24K /etc/pki 4.0K /etc/dm 12K /etc/cron.d 26M /etc 16K /opt/google/chrome/cron 92K /opt/google/chrome/default_apps 26M /opt/google/chrome/swiftshader 19M /opt/google/chrome/locales 228M /opt/google/chrome 228M /opt/google 228M /opt 334G / Quote Link to comment Share on other sites More sharing options...
réjean Posted July 11, 2017 Author Share Posted July 11, 2017 Rejean!!! You HAVE been missed! So good to see you! Hi, Eric. Like I said I have been reading but not posting. Too busy with our local farmer's market and the 3 or 4 other communauty projects. 1 Quote Link to comment Share on other sites More sharing options...
ebrke Posted July 11, 2017 Share Posted July 11, 2017 Maybe redirect output to a document so you can look at it more easily: du -h / >usageThat would give you a document named usage in your current directory with the output from the du. Just seems to me there must be something big lurking. You can also run du with the -a switch to list all files as well as directories, but it's going to generate a massive amount of output and I think you'd be better finding the large directory and then seeing what's in it. 1 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 11, 2017 Author Share Posted July 11, 2017 Maybe redirect output to a document so you can look at it more easily: du -h / >usageThat would give you a document named usage in your current directory with the output from the du. Just seems to me there must be something big lurking. You can also run du with the -a switch to list all files as well as directories, but it's going to generate a massive amount of output and I think you'd be better finding the large directory and then seeing what's in it. Thanks ebrke I'll do so later this evening, still have to water the gardens, everything is so dry. Quote Link to comment Share on other sites More sharing options...
sunrat Posted July 12, 2017 Share Posted July 12, 2017 Hi rejean! This command will sort in size order: du -sh * | sort -hr The "*" will act on the current directory, so cd to /. Add "x" to the options to restrict to one file system so it doesn't include other mounted/symlinked drives. du -shx * | sort -hr Your posted image shows 306.1GB in media directory. Time to delete all those old episodes of Game Of Thrones. This is probably not your problem though as /media contains other mounted filesystems. An old motto I like is "You learn something every day". I just tested this and found if you just put "/" instead of cd to / and use "*", it has different behaviour. root@siduction-brain:/# du -shx / | sort -hr 21G / root@siduction-brain:/# du -shx * | sort -hr du: cannot access 'proc/5887/task/5887/fd/3': No such file or directory du: cannot access 'proc/5887/task/5887/fdinfo/3': No such file or directory du: cannot access 'proc/5887/fd/3': No such file or directory du: cannot access 'proc/5887/fdinfo/3': No such file or directory 13G home 4.8G usr 1.2G lib 604M var 252M boot 246M opt 16M sbin 14M bin 11M root 8.0M etc 1.6M run 1004K tmp 16K lost+found 12K mnt 8.0K media . . . Also I notice your /var is 5.2GB. This is mainly apt cache and logs. Try clearing cache with apt-get clean and then run the above du commands in /var to see if some logs are getting unwieldy. A couple of times ages ago I had runaway log files fill my disk. 2 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 12, 2017 Author Share Posted July 12, 2017 Hi rejean! This command will sort in size order: du -sh * | sort -hr The "*" will act on the current directory, so cd to /. Add "x" to the options to restrict to one file system so it doesn't include other mounted/symlinked drives. du -shx * | sort -hr Your posted image shows 306.1GB in media directory. Time to delete all those old episodes of Game Of Thrones. This is probably not your problem though as /media contains other mounted filesystems. An old motto I like is "You learn something every day". I just tested this and found if you just put "/" instead of cd to / and use "*", it has different behaviour. root@siduction-brain:/# du -shx / | sort -hr 21G / root@siduction-brain:/# du -shx * | sort -hr du: cannot access 'proc/5887/task/5887/fd/3': No such file or directory du: cannot access 'proc/5887/task/5887/fdinfo/3': No such file or directory du: cannot access 'proc/5887/fd/3': No such file or directory du: cannot access 'proc/5887/fdinfo/3': No such file or directory 13G home 4.8G usr 604M var 1.2G lib 252M boot 246M opt 16M sbin 14M bin 11M root 8.0M etc 1.6M run 1004K tmp 16K lost+found 12K mnt 8.0K media . . . Also I notice your /var is 5.2GB. This is mainly apt cache and logs. Try clearing cache with apt-get clean and then run the above du commands in /var to see if some logs are getting unwieldy. A couple of times ages ago I had runaway log files fill my disk. rejean@rejean-G41MT-S2PT:~$ sudo du -sh * | sort -hr [sudo] password for rejean: 9.0G Downloads 8.4G Documents 2.8G Pictures 820M Black camera 424M Mother Canada 142M 12-05-17 94M My Games 12M Webpage 4.7M puffballs.JPG 4.5M DSCN1456.JPG 4.5M DSCN1454.JPG 4.5M DSCN1453.JPG 4.4M IMG_0763.JPG 2.3M Zeus.exe 544K Screenshot at 2016-09-09 23-55-24.png I can move files from Downloads, Pictures and Documents into another partition that is about 500 GB reserved for storage which I have done before. Quote Link to comment Share on other sites More sharing options...
sunrat Posted July 12, 2017 Share Posted July 12, 2017 You just ran that on only your home directory. cd to / and run it. Then cd to /var and run it. roger@siduction-brain:~$ su Password: root@siduction-brain:/home/roger# cd /var root@siduction-brain:/var# du -shx * | sort -hr 318M lib 260M log 27M cache 36K tmp 36K backups 28K spool 4.0K opt 4.0K mail 4.0K local 0 run 0 lock I can move files from Downloads, Pictures and Documents into another partition that is about 500 GB reserved for storage which I have done before. That will obviously help a lot, and is exactly what I do. I mainly use home folder as temporary work/storage and then move files to keep permanently to a separate partition. 2 Quote Link to comment Share on other sites More sharing options...
Dr. J Posted July 12, 2017 Share Posted July 12, 2017 Hi... Just throwing out a hunch here, it seems that the /media directory is quite large. As far as I know that's where drives get mounted in Linux Mint, so if you have another mounted drive or partition with a lot of stuff in it that's probably why. It could be part of the problem though... 1 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 12, 2017 Author Share Posted July 12, 2017 Also I notice your /var is 5.2GB. This is mainly apt cache and logs. Try clearing cache with apt-get clean and then run the above du commands in /var to see if some logs are getting unwieldy. A couple of times ages ago I had runaway log files fill my disk. Hi, sunrat. Do you mean "sudo apt-get clean /var" or just "sudo apt-get clean"? Quote Link to comment Share on other sites More sharing options...
réjean Posted July 12, 2017 Author Share Posted July 12, 2017 Hi... Just throwing out a hunch here, it seems that the /media directory is quite large. As far as I know that's where drives get mounted in Linux Mint, so if you have another mounted drive or partition with a lot of stuff in it that's probably why. It could be part of the problem though... The media folder was holding my "storage partition 500 GB with over 300 GB used. When I unmounted the storage partition the media folder was empty. Quote Link to comment Share on other sites More sharing options...
Dr. J Posted July 12, 2017 Share Posted July 12, 2017 Hi... Just throwing out a hunch here, it seems that the /media directory is quite large. As far as I know that's where drives get mounted in Linux Mint, so if you have another mounted drive or partition with a lot of stuff in it that's probably why. It could be part of the problem though... The media folder was holding my "storage partition 500 GB with over 300 GB used. When I unmounted the storage partition the media folder was empty. That explains that then. 1 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 12, 2017 Author Share Posted July 12, 2017 (edited) Here is what I don't understand. I have a partition (~40 GB) for Linux Mint / and one (~60 GB) for Linux Mint /home, plus others now if reduce the content of /var or /media that doesn't make the / partition less full, So how would someone go about solving the problem? This morning I did some updating and I notice that one of them was Linux firmware which made me think that I might have several kernels ( do they take a lot of space?) Edited July 12, 2017 by réjean Quote Link to comment Share on other sites More sharing options...
réjean Posted July 12, 2017 Author Share Posted July 12, 2017 You just ran that on only your home directory. cd to / and run it. Then cd to /var and run it. rejean@rejean-G41MT-S2PT:~$ su Password: rejean-G41MT-S2PT rejean # cd / rejean-G41MT-S2PT / # du -sh * | sort -hr du: cannot access 'proc/14165/task/14165/fd/4': No such file or directory du: cannot access 'proc/14165/task/14165/fdinfo/4': No such file or directory du: cannot access 'proc/14165/fd/4': No such file or directory du: cannot access 'proc/14165/fdinfo/4': No such file or directory du: cannot access 'run/user/1000/gvfs': Permission denied 21G home 7.0G usr 6.3G media 3.3G lib 766M boot 591M var 228M opt 26M etc 18M sbin 18M run 16M bin 6.3M root 956K dev 248K tmp 16K lost+found 8.0K mnt 4.0K srv 4.0K lib64 4.0K cdrom 0 vmlinuz.old 0 vmlinuz 0 sys 0 proc 0 initrd.img.old 0 initrd.img rejean-G4 rejean-G41MT-S2PT / # and; rejean-G41MT-S2PT / # cd /var rejean-G41MT-S2PT var # du -sh * | sort -hr 394M lib 166M cache 15M backups 12M tmp 5.2M log 56K spool 4.0K opt 4.0K mail 4.0K local 0 run 0 lock rejean-G41MT-S2PT var # Quote Link to comment Share on other sites More sharing options...
sunrat Posted July 13, 2017 Share Posted July 13, 2017 Here is what I don't understand. I have a partition (~40 GB) for Linux Mint / and one (~60 GB) for Linux Mint /home, plus others now if reduce the content of /var or /media that doesn't make the / partition less full,If they are on separate partitions, emptying won't affect the size of the actual / partition. I didn't realise you have a separate /home partition, which makes your 40GB / being full even more baffling. My / is 30GB including /home (currently 13GB) and contains 21GB atm, so only 8GB is actual OS. rejean@rejean-G41MT-S2PT:~$ su Password: rejean-G41MT-S2PT rejean # cd / rejean-G41MT-S2PT / # du -sh * | sort -hr You need to add the x so it doesn't include the contents of other mounted filesystems/partitions. For some reason, GUI tools seem to fail in providing this option. cd / du -shx * | sort -hr So how would someone go about solving the problem? This morning I did some updating and I notice that one of them was Linux firmware which made me think that I might have several kernels ( do they take a lot of space?) Do this to find out which kernels you have installed: dpkg -l |grep linux-image It is a good idea to keep one previous kernel for Justin, as well as the current one. I just checked and I have 8 kernels installed. Time for spring clean. siduction has the excellent kernel-remover tool, not sure the easiest way to do it in Mint. Quote Link to comment Share on other sites More sharing options...
réjean Posted July 13, 2017 Author Share Posted July 13, 2017 [ You need to add the x so it doesn't include the contents of other mounted filesystems/partitions. For some reason, GUI tools seem to fail in providing this option. cd / du -shx * | sort -hr It doesn't seem to make a big difference; rejean-G41MT-S2PT var # cd / rejean-G41MT-S2PT / # du -shx * | sort -hr du: cannot access 'proc/21865/task/21865/fd/4': No such file or directory du: cannot access 'proc/21865/task/21865/fdinfo/4': No such file or directory du: cannot access 'proc/21865/fd/4': No such file or directory du: cannot access 'proc/21865/fdinfo/4': No such file or directory 22G home 7.0G usr 3.3G lib 766M boot 591M var 228M opt 26M etc 18M sbin 18M run 16M bin 6.3M root 272K tmp 16K lost+found 8.0K mnt 8.0K media 4.0K srv 4.0K lib64 4.0K cdrom 0 vmlinuz.old 0 vmlinuz 0 sys 0 proc 0 initrd.img.old 0 initrd.img 0 dev rejean-G41MT-S2PT / # Do this to find out which kernels you have installed: dpkg -l |grep linux-image It is a good idea to keep one previous kernel for Justin, as well as the current one. I just checked and I have 8 kernels installed. Time for spring clean. siduction has the excellent kernel-remover tool, not sure the easiest way to do it in Mint. rejean-G41MT-S2PT / # dpkg -l |grep linux-image ii linux-image-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-65-generic 4.4.0-65.86 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-65-generic 4.4.0-65.86 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP rejean-G41MT-S2PT / # Quote Link to comment Share on other sites More sharing options...
sunrat Posted July 13, 2017 Share Posted July 13, 2017 I was thinking the "x" option would show the usage of / without including the contents of /home if it's on a separate partition. Maybe I'm wrong. I don't have separate /home partition so can't test it. You could definitely recover a lot of space by removing the oldest 13 kernels and their extras. IIRC, my last kernel update indicated it would take 150MB of space. 1 Quote Link to comment Share on other sites More sharing options...
réjean Posted July 14, 2017 Author Share Posted July 14, 2017 I don't get it. I went into synaptic and removed all the linux kernels except for the 2 most recent. I restarted the machine and the rest seem to still be there but synaptic tells me they are gone. Quote Link to comment Share on other sites More sharing options...
Hedon James Posted July 14, 2017 Share Posted July 14, 2017 I restarted the machine and the rest seem to still be there but synaptic tells me they are gone. I'm assuming you mean they're still there at startup. You need to update GRUB to refresh your list of available kernels for GRUB to boot from. sudo update-grub Restart and that should clean it right up for ya! Quote Link to comment Share on other sites More sharing options...
sunrat Posted July 15, 2017 Share Posted July 15, 2017 The status has changed from "ii" (fully installed) to "rc" (removed but config files remain). You need to do purge to remove config files too. apt-get purge whatever-package I think Synaptic can do this with the "Completely remove" option. Grub should update automatically when you remove a kernel. Quote Link to comment Share on other sites More sharing options...
réjean Posted July 15, 2017 Author Share Posted July 15, 2017 I didn't do anything new but it now looks much better to me; rejean@rejean-G41MT-S2PT:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 799M 9.5M 789M 2% /run /dev/sda10 19G 8.6G 8.7G 50% / tmpfs 3.9G 123M 3.8G 4% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda11 42G 19G 21G 48% /home cgmfs 100K 0 100K 0% /run/cgmanager/fs tmpfs 799M 52K 799M 1% /run/user/1000 /dev/sdb6 37G 4.2G 31G 13% /media/rejean/2441863c-b014-4a09-9591-bd6a5b30a03e /dev/sdb7 55G 54M 52G 1% /media/rejean/9b143458-0fca-4c0c-956d-8e3424ab3af5 /dev/sda12 24G 6.4G 17G 28% /media/rejean/6e59f37e-a4ac-4e34-aff0-663dc3f20251 rejean@rejean-G41MT-S2PT:~$ where sda10 is my / partition at 50% and sda11 my /home partition at 48%. 2 Quote Link to comment Share on other sites More sharing options...
Dr. J Posted July 17, 2017 Share Posted July 17, 2017 I'm suddenly starting to think this is just a nuance of MATE disc usage analysis... It's showing the percentage of used space, 100% of which is below the root directory. In your screenshot the top line says that around 350 GB of over 500 are used. I noticed this after switching to MATE on my main laptop... In the shot below, you can see that I have everything on one large partition containing 127 ish gigabytes of data, with 100% of it listed as being stored under /. In your case it may be combining multiple partitions. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted July 17, 2017 Share Posted July 17, 2017 Sorry I am late to the party but none of the directories you listed equaled 358gb and it had nothing to do with packages or package cache. The reason I say this is because you could remove every package and all of your cache on your system and you will still not get 300gb worth. If anything, this is probably what happened... You unmounted a drive (like your /media mount) but it didn't clear from the system so the files were still under / which is your harddrive. I have had this happen before on a unclean unmount. Actually Dr. J has the correct answer.. It's the way the Disk Usage Analyzer displays it all. Notice how it says Total filesystem capacity 558gb (used: 358.8 GB available: 229.2 GB) It just shows as / taking up the 385.1 GB as that is the size of the partition. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.