Why do my systems grow disproportionately in space?.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I want to see where space is being consumed, I start up ncdu in a terminal or on a vtty (e.g. Ctrl-Alt-F3).
The first place to examine is /var/cache/archives/. You'll probably see many *.deb files from which installed packages came. They don't need to be kept, but they do make it convenient in case a package needs to be reinstalled while offline, or a newer package is broken and you wish to revert to the prior version.
If /var/log/journal/ exists, you may find it has a lot of large files, more than you're likely to have any use for. You can remove the older ones directly, or edit /etc/systemd/journal.conf to automatically limit how much space these files use.
The problem is that although I know that in Var (I have seen it say before) probably are those innny accumulations, etc, I do not have knowledge to distinguish what is the basic or necessary for the system and what is not (already in an occasion I broke a system wanting to clean the trash ... ").
If the problem of the GB increase in my system are not related to the updates, as it is the case, then there is no practical solution for me -- the system will continue to grow, until it have to reach the point where I will have to be forced to make a new installation.
You are quite right not to want to remove anything in /var by hand. This is where a lot of essential databases live and you don't want to corrupt them. But, as several people have already pointed out, there are commands like apt clean and apt autoclean for clearing these. Learn these commands and use them once a month for housekeeping if your disk usage bothers you. Personally I don't think your usage is at all unusual or very likely to get out of hand; my Slackware root partition is 66% full and has been for years.
One more tip: before you remove a big file, ensure it is not in use.
Run
fuser bigfile
and test the shown process number (pid)
with
ps -fp pid
If an open file is deleted, it's data is still there, until the accessing process terminates (or the system reboots).
Often an open file can be truncated:
...there is no practical solution for me -- the system will continue to grow, until it have to reach the point where I will have to be forced to make a new installation.
But why not regularly use your package manager and bleachbit to monitor and clean up your system?
Of course I do it, if not, the 50GB of the partition were full.
For all that I have read here in this post and in other places and knowing about my disability and incomprehension, I am now sure that this great increase is due to the wrong ways I have sometimes removed packets (being these even in use) I have added repos, which I have stopped using "eliminating them" I am almost convinced inappropriately, etc., etc.
Bleachbit is not a magician.
I must be very careful now with the new installation of MX-21, it is the only thing I can do, since once I do something wrong, the residue will stay somewhere and because of my lack of knowledge I will never know where this It is located, nor how to eliminate them.
This is the lesson I have learned with these comments.
For all that I have read here in this post and in other places and knowing about my disability and incomprehension, I am now sure that this great increase is due to the wrong ways I have sometimes removed packets (being these even in use) I have added repos, which I have stopped using "eliminating them" I am almost convinced inappropriately, etc., etc.
Please remove from your apt configuration any extra repositories that you have added. I wish you had told us right at the beginning that you were doing that. It is almost always a bad thing to do. The additional repos will contain packages that are incompatible with your main system, eventually creating what is sometimes called a "Frankendistro", a dysfunctional monster. Some of your extra disk usage may also be due to multiple downloads from different repos.
I found some interesting commands and I could see that I had something that was no longer necessary in Flatpack, I removed it and I stayed now in 17GB.
Code:
sudo du -h -d1 / | sort -hr
sudo du -h -d1 / var | sort -hr
sudo du -h -d1 / usr | sort -hr
Code:
keos@mx:~$ sudo du -h -d1 / | sort -hr
du: no se puede acceder a '/run/user/1000/gvfs': Permiso denegado
du: no se puede acceder a '/run/user/118/gvfs': Permiso denegado
du: no se puede acceder a '/proc/8317/task/8317/fd/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8317/task/8317/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8317/fd/4': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8317/fdinfo/4': No existe el fichero o el directorio
17G /
7.8G /home
5.3G /usr
1.9G /root
1.4G /opt
411M /var
94M /boot
26M /etc
2.8M /run
40K /tmp
16K /lost+found
8.0K /media
4.0K /mnt
4.0K /.cache
0 /sys
0 /proc
0 /dev
keos@mx:~$ sudo du -h -d1 / var | sort -hr
du: no se puede acceder a '/run/user/1000/gvfs': Permiso denegado
du: no se puede acceder a '/run/user/118/gvfs': Permiso denegado
du: no se puede acceder a '/proc/8327/task/8327/fd/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8327/task/8327/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8327/fd/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8327/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a 'var': No existe el fichero o el directorio
17G /
7.8G /home
5.3G /usr
1.9G /root
1.4G /opt
411M /var
94M /boot
26M /etc
2.8M /run
40K /tmp
16K /lost+found
8.0K /media
4.0K /mnt
4.0K /.cache
0 /sys
0 /proc
0 /dev
keos@mx:~$ sudo du -h -d1 / usr | sort -hr
du: no se puede acceder a '/run/user/1000/gvfs': Permiso denegado
du: no se puede acceder a '/run/user/118/gvfs': Permiso denegado
du: no se puede acceder a '/proc/8333/task/8333/fd/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8333/task/8333/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8333/fd/3': No existe el fichero o el directorio
du: no se puede acceder a '/proc/8333/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a 'usr': No existe el fichero o el directorio
17G /
7.8G /home
5.3G /usr
1.9G /root
1.4G /opt
411M /var
94M /boot
26M /etc
2.8M /run
40K /tmp
16K /lost+found
8.0K /media
4.0K /mnt
4.0K /.cache
0 /sys
0 /proc
0 /dev
keos@mx:~$
Maybe normal for others but as I said I need to download it much more, for the moment I'm tired, I'll keep looking carefully ... I do not want to break the system again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.