How to manage packages and keep disk free

I have a question about keeping my disk space as clean as possible.

Why I ask:
Yesterday I had 350+ Gb of disk usage.
But today I returned to the disk image from December 2021, installed all missing packages, downloaded all files from backup, updated everything. Now I have 135Gb of used space. The same system, the same packages, the same files.

I read several articles about pacman cash, cleaning system, orphaned packages and didn’t find anything where I should search for these additional 200+ Gb.

How is it possible? Maybe I do something wrong? How is it possible to have 130Gb and around 350Gb on the same system? How should I keep my system as clean as possible?

It is probably because you deleted all your btrfs snapshots.

1 Like

I doubt it, because it is only 3,9 Gb of β€œunshared differences” between December and now. And I do not shapshot /home directory…
Maybe I am talking about something I do not understand fully, of course.

Is it possible for btrfs snapshots to be so lagre?

Pacman cache?

Sorry for my English. Yes.

Sorry, I meant was the pacman cache empty in both cases?

Cleaning cache was most assuredly big for me the last time. Not 200GB but it was a lot. It’s part of my routine. I have in my simple notes one for my maintenance.

1 Like

This will be almost impossible to answer at this point since you have restored over the data. It could have been a lot of things but it is no longer possible to check.

If you have btrfs you can take better look it’s disk usage with this:
https://aur.archlinux.org/packages/btrfs-du

example:

Summary

Subvolume Total Exclusive ID
─────────────────────────────────────────────────────────────────────────────────────────
@log 13.78MiB 13.78MiB 257
@cache 210.30MiB 210.30MiB 258
@ 8.04GiB 1.56GiB 440
timeshift-btrfs/snapshots/2022-02-18_09-00-02/@ 6.82GiB 746.85MiB 486
timeshift-btrfs/snapshots/2022-02-19_09-00-01/@ 6.80GiB 22.84MiB 489
timeshift-btrfs/snapshots/2022-02-21_10-00-01/@ 6.79GiB 17.29MiB 492
timeshift-btrfs/snapshots/2022-02-22_10-00-01/@ 6.79GiB 16.20MiB 494
timeshift-btrfs/snapshots/2022-02-23_10-00-01/@ 6.78GiB 2.55MiB 497
timeshift-btrfs/snapshots/2022-02-24_10-00-01/@ 6.78GiB 1020.00KiB 498
timeshift-btrfs/snapshots/2022-02-24_15-36-26/@ 6.78GiB 1.98MiB 500
timeshift-btrfs/snapshots/2022-02-24_15-46-49/@ 6.78GiB 1.96MiB 501
timeshift-btrfs/snapshots/2022-02-24_16-19-33/@ 6.78GiB 10.58MiB 502
timeshift-btrfs/snapshots/2022-02-25_09-01-35/@ 6.78GiB 3.97MiB 503
─────────────────────────────────────────────────────────────────────────────────────────
Total exclusive data 2.57GiB

How do you have 135GB?

Do you store large amounts in your home directory?

Snapshots are the obvious place to start, unless ave you any large mounted partitions that are being recursively included in your count.

Systemd journal logs can grow up to 4GB if left unchecked, but nowhere near the +220GB added.

sudo journalctl --vacuum-size=50M

If you are accicently creating snapshots for home directory.

Yes, I have this. Now it is actually 72 Gb as I moved all videos, records and backups to my storage. I just afraid that in 2-3 months it will be 350 Gb again. I will check it further as I see it isn’t an obvious question related to some simple mistake in OS maintenance I could made.

Can you post it here in a plain text format? I will save it too :slight_smile:

There’s a lot of value to learn by typing it out yourself.

I’m sure you’ll come up with others too.

2 Likes