LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-29-2021, 08:36 PM   #16
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065

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.
 
1 members found this post helpful.
Old 10-30-2021, 08:52 AM   #17
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
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.

Thanks.
 
Old 10-30-2021, 09:11 AM   #18
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,499
Blog Entries: 19

Rep: Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410
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.
 
Old 10-30-2021, 09:15 AM   #19
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,768

Rep: Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193
Compare the good and the bad system!
On both run

cd /

and from there run

ncdu

du -akx | sort -n

du -akxS | sort -n
 
Old 10-30-2021, 09:26 AM   #20
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,768

Rep: Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193Reputation: 1193
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:

true > bigfile

and the data in bigfile is deleted.
 
Old 10-30-2021, 08:00 PM   #21
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 763

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
Quote:
Originally Posted by Camello View Post
...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?

At least it gives me a sense of control...
 
Old 10-31-2021, 04:08 AM   #22
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Thumbs up

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.

Thank you.
 
Old 10-31-2021, 07:26 AM   #23
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,499
Blog Entries: 19

Rep: Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410
Quote:
Originally Posted by Camello View Post
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.

You might like to have a look at https://www.linuxquestions.org/quest...se-them-37648/

Last edited by hazel; 10-31-2021 at 07:37 AM.
 
Old 10-31-2021, 10:08 AM   #24
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Dou you means this ...?

Click image for larger version

Name:	A.png
Views:	14
Size:	55.7 KB
ID:	37611
 
Old 10-31-2021, 10:36 AM   #25
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,499
Blog Entries: 19

Rep: Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410
No, I mean the repos listed in the /etc/apt.d.
 
Old 10-31-2021, 11:47 AM   #26
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
No, nothing named by repos ...
 
Old 10-31-2021, 12:13 PM   #27
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
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.

Thanks!.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Survey NON-posters "why not?", to grow LQ [?] Jjanel LQ Suggestions & Feedback 3 05-15-2017 02:56 PM
Why? Why SetPageReserved is needed when map a kernel space to user space? osdev Linux - Kernel 9 03-10-2013 06:16 PM
zypper update makes /var/lib/rpm/Packages grow and grow and grow... Earl3 Linux - General 3 06-27-2011 02:07 PM
Growing (really grow) a raid1 (mdadm --grow) didiw Linux - Software 1 01-20-2011 05:39 PM
LXer: Linux desktops grow and grow and grow LXer Syndicated Linux News 0 11-23-2007 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration