How to clear space?

Hi. I am on Tumbleweed. For some reason my space is filling up. It used to be 62.9 Gb left now its 60.9 gb left.

Could it be the kernel log files spouting errors? What is the root cause of this? I have uninstalled and deleted a lot of stuff to no avail.

Check your journal.

Check the size of /var/log

1 Like
total 78664
drwxr-xr-x 1 root   root                1986 Jan 29 20:05 .
drwxr-xr-x 1 root   root                 120 Dec 12 10:25 ..
-rw-r--r-- 1 root   root               23440 Jan 28 10:42 alternatives.log
drwxr-xr-x 1 root   root                   0 Jan 25 20:59 apparmor
drwxr-x--- 1 root   audit                106 Dec  4 20:00 audit
-rw------- 1 root   root             1103929 Jan 29 20:05 boot.log
-rw------- 1 root   root                3416 Nov 26 08:23 boot.log-20231126.xz
-rw------- 1 root   root                4420 Dec  1 04:12 boot.log-20231201.xz
-rw------- 1 root   root                4724 Dec  5 09:23 boot.log-20231205.xz
-rw------- 1 root   root                3716 Dec  7 09:19 boot.log-20231207.xz
-rw------- 1 root   root                3596 Dec  8 08:27 boot.log-20231208.xz
-rw------- 1 root   root                6932 Dec 19 14:55 boot.log-20231219.xz
-rw------- 1 root   root                3120 Jan 13 17:14 boot.log-20240113.xz
-rw-rw---- 1 root   utmp                6144 Nov 25 20:56 btmp
drwxr-x--- 1 chrony chrony                 0 Oct  5 20:24 chrony
drwxr-xr-x 1 root   lp                    84 Sep 22 22:05 cups
-rw-r----- 1 root   root                   0 Oct  9  2022 firewalld
drwxrwxr-x 1 root   lp                     6 Jan  4 19:50 hp
drwxr-sr-x 1 root   systemd-journal       64 Oct  9  2022 journal
drwx------ 1 root   root                   0 Dec 22 00:52 krb5
drwx------ 1 root   root                   8 Jan 27 01:23 libvirt
drwx------ 1 mysql  mysql                  0 Dec 17 23:16 mysql
-rw------- 1 root   root              355414 Jan 29 08:47 pbl.log
-rw-r----- 1 root   root             3205243 Jan 28 15:02 pk_backend_zypp
-rw-r----- 1 root   root            10738272 Jan 27 13:24 pk_backend_zypp-1
-rw------- 1 root   root               85502 Jan 29 20:05 plymouth-debug.log
-rw------- 1 root   root               29340 Jan 29 20:03 plymouth-shutdown-debug.log
drwx------ 1 root   root                   0 Oct  9  2022 private
drwxr-x--- 1 root   root                   0 Jan 13 02:30 samba
-rw-r----- 1 root   root             6428205 Jan 29 20:15 snapper.log
-rw-r----- 1 root   root              373392 Jul 28  2023 snapper.log-20230729.xz
drwx------ 1 root   root                   0 Jan 16 00:00 speech-dispatcher
drwx--x--x 1 root   root                  14 Jan 27 01:23 swtpm
drwxr-x--- 1 root   root                   0 Dec  5 18:09 tuned
drwxr-xr-x 1 root   root                 498 Jan 27 08:41 updateTestcase-2024-01-27-08-41-14
drwxr-xr-x 1 root   root                 498 Jan 28 10:40 updateTestcase-2024-01-28-10-40-53
-rw-r----- 1 root   root             6122781 Jan 29 20:18 wpa_supplicant.log
-rw-r----- 1 root   root              287680 Dec 17  2022 wpa_supplicant.log-20221218.xz
-rw-r----- 1 root   root              315568 Mar  7  2023 wpa_supplicant.log-20230308.xz
-rw-r----- 1 root   root              322972 Jun  4  2023 wpa_supplicant.log-20230605.xz
-rw-r----- 1 root   root              339168 Jul 29  2023 wpa_supplicant.log-20230729.xz
-rw-r----- 1 root   root              380452 Sep  7 21:26 wpa_supplicant.log-20230908.xz
-rw-r----- 1 root   root              433980 Oct 21 21:52 wpa_supplicant.log-20231022.xz
-rw-rw-r-- 1 root   utmp              244992 Jan 29 20:05 wtmp
-rw-rw-r-- 1 root   utmp                8672 Oct 29  2022 wtmp-20221029.xz
-rw-rw-r-- 1 root   utmp                8880 Dec  3  2022 wtmp-20221203.xz
-rw-rw-r-- 1 root   utmp                9288 Jan 10  2023 wtmp-20230110.xz
-rw-rw-r-- 1 root   utmp               10280 Feb 19  2023 wtmp-20230219.xz
-rw-rw-r-- 1 root   utmp               10236 Mar 23  2023 wtmp-20230323.xz
-rw-rw-r-- 1 root   utmp                9192 May  2  2023 wtmp-20230502.xz
-rw-rw-r-- 1 root   utmp               11712 Jun 28  2023 wtmp-20230628.xz
-rw-rw-r-- 1 root   utmp               10664 Aug 27 08:47 wtmp-20230827.xz
-rw-rw-r-- 1 root   utmp               10252 Oct 22 06:56 wtmp-20231022.xz
-rw-r--r-- 1 root   root               45011 Jan 29 20:06 Xorg.0.log
-rw-r--r-- 1 root   root               45599 Jan 29 20:03 Xorg.0.log.old
drwx------ 1 root   root                1060 Jan 26 13:59 YaST2
drwxr-x--- 1 root   root                  52 Jan 27 03:32 zypp
-rw-r----- 1 root   root            45546502 Jan 29 16:28 zypper.log
-rw-r----- 1 root   root             1158016 Oct 21 21:51 zypper.log-20231022.xz
-rw-r----- 1 root   root              551000 Nov  3 13:52 zypper.log-20231105.xz
-rw-r----- 1 root   root              389664 Nov 15 10:23 zypper.log-20231115.xz
-rw-r----- 1 root   root              373880 Nov 19 18:08 zypper.log-20231122.xz
-rw-r----- 1 root   root              377500 Nov 30 11:35 zypper.log-20231201.xz
-rw-r----- 1 root   root              424652 Dec  6 17:15 zypper.log-20231207.xz
-rw-r----- 1 root   root              640632 Dec 18 19:05 zypper.log-20231219.xz

You should copy n paste from the CLI and paste it into a Reply using the Preformatted Text feature </> on the Taskbar. Also, include the command you executed and following prompt. It’s much more readable that way.

Have you checked ~/.cache, ~/.local and /tmp ?
For example, du -h --max-depth=1 /tmp ~/.cache ~/.local

But do not delete anything if you do not know precisely what you are doing and what the data are needed for.

@Basilcat using btrfs? Using snapper (snapshots)?

Run these commands as root user;

btrfs filesystem usage /
journalctl --disk-usage
coredumpctl list
snapper list
1 Like

Do you even understand the output from the TO? This file is only 10MB big. This is completely normal for a standard system…so no problem at all.

-rw-r-----  1 root root            10587297 21. Jan 20:19 pk_backend_zypp-1

That means you recommended the TO to delete round about 50MB because “That should restore some space back and is a good start”.

Do’oh :face_with_raised_eyebrow:

And recommending the TO to directly delete stuff is a bad advice. It would be better to analyze the problem first before jumping to conclusions which wont help the TO.

Malcolm pointed out some helpful commands for first analysis. And i pointed to the documentation for the journal which explains what the max size of it can be and how to properly set it up via journald.conf.

Blindly deleting stuff without knowing what the files are doing and how it is done properly is in most cases a beginner mistake.

Free space being filled can be caused by a lot of different factor, depending of which program is installed and how you use your system … the first thing to do is to investigate to find the cause of your problem …

In addition to @malcolmlewis commands you can use a tool like filelight Filelight - KDE Applications ( which is probably already installed if you use kde ) to see which directory on your system is the most filled up, it can help.

Also if by any chance that can help, one year ago I’ve discovered that flatpak was gradually eating more and more disk space on my system, after the run of the command flatpak repair ~20GB were free and had no issues after that…

ncdu is a lightweight text UI program designed for easy navigation for the purpose of determining how much space is consumed by each directory. If snapshotting is enabled, it can be highly consumptive. If keeping downloaded rpms in the cache after download and installation is enabled, it can gobble a lot of space. So can the systemd journal if its size isn’t limited via /etc/systemd/journald.conf. Everything in ~/.cache/ is disposable, and may need occasional purging, depending on the behavior of your apps, and whether any do a lot of crashing. Anything in /var/log/ more than a year old is basically useless.

Whether 60G or 62G amounts to a little or a lot or something else is unknowable without context. How much is the total filesystem space? How much of it is used?