Disk cleanup tools?

Hi,

I’m looking for directions on how to clean up some disk space.

I’m sort of new at this. I’ve had Garuda installed for several months now and it’s been working great. However, one thing I’ve noticed is I’ve been steadily running low on disk space.

Coming from Windows, I don’t know how to check what’s taking up all the disk space and how to clean up. On Windows, I could right click a drive and run the cleanup tool, deleting old install files, logs, and other redundant files. I could also view my installed programs, sorted by size, from the “Add or remove programs” menu, and remove whatever I didn’t need.

On Garuda/Arch, I’m not sure what the equivalent tools are for those things. I ran the Garuda Assistant and I removed orphans, cleared the cache and also cleared package cache. Disk usage still seems a bit high.

I know Garuda also has Octopi, but I don’t see any info on installed package size & whether or not the packages were installed by me or are dependencies (of Garuda or other packages). So, I don’t know what’s safe to uninstall and what isn’t.

I also know Snapper snapshots might take up some space, but I have no idea how to check that.

Can anyone give me any pointers on how to clean up my disk? Are there any specific tools for this?

Thanks.

garuda-inxi:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_ADDRESS = "en_US.UTF-8",
LC_NAME = "en_US.UTF-8",
LC_MONETARY = "en_US.UTF-8",
LC_PAPER = "en_US.UTF-8",
LC_IDENTIFICATION = "en_US.UTF-8",
LC_TELEPHONE = "en_US.UTF-8",
LC_MEASUREMENT = "ro_RO.UTF-8",
LC_TIME = "en_001.UTF-8",
LC_NUMERIC = "ro_RO.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
System:
Kernel: 6.7.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: hpet available: acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=4fdf9e35-eb8e-4181-93e8-eae07da02c42 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
amd_iommu=on ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_wayland vt: 1
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 82KC v: Lenovo V14 G2 ALC
serial: <superuser required> Chassis: type: 10 v: Lenovo V14 G2 ALC
serial: <superuser required>
Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
UEFI: LENOVO v: GLCN46WW date: 04/29/2022
Battery:
ID-1: BAT0 charge: 37.4 Wh (96.6%) condition: 38.7/38.0 Wh (101.9%)
volts: 8.5 min: 7.7 model: LGC L20L2PF0 type: Li-poly serial: <filter>
status: not charging cycles: 67
CPU:
Info: model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64 type: MT MCP
arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22
process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x68 (104) stepping: 1
microcode: 0x8608103
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
desc: 2x4 MiB
Speed (MHz): avg: 1028 high: 2519 min/max: 400/4056 scaling:
driver: amd-pstate-epp governor: performance cores: 1: 400 2: 2453 3: 400
4: 400 5: 400 6: 2065 7: 400 8: 400 9: 400 10: 400 11: 2519 12: 2103
bogomips: 50304
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Lucienne vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5
code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s
lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1,eDP-1
empty: none bus-ID: 04:00.0 chip-ID: 1002:164c class-ID: 0300 temp: 43.0 C
Device-2: Bison Integrated Camera driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3:2 chip-ID: 5986:2137
class-ID: 0e02
Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4
compositor: kwin_wayland driver: X: loaded: amdgpu unloaded: modesetting
alternate: fbdev,vesa dri: radeonsi gpu: amdgpu d-rect: 1920x2160
display-ID: 0
Monitor-1: HDMI-A-1 pos: primary,top res: 1920x1080 size: N/A modes: N/A
Monitor-2: eDP-1 pos: bottom res: 1920x1080 size: N/A modes: N/A
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
drv: radeonsi inactive: gbm
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.3-arch1.1
glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
renoir LLVM 16.0.6 DRM 3.56 6.7.1-zen1-1-zen) device-ID: 1002:164c
memory: 1.95 GiB unified: no display-ID: :1.0
API: Vulkan v: 1.3.274 layers: 3 device: 0 type: integrated-gpu name: AMD
Radeon Graphics (RADV RENOIR) driver: mesa radv v: 23.3.3-arch1.1
device-ID: 1002:164c surfaces: xcb,xlib,wayland device: 1 type: cpu
name: llvmpipe (LLVM 16.0.6 256 bits) driver: mesa llvmpipe
v: 23.3.3-arch1.1 (LLVM 16.0.6) device-ID: 10005:0000
surfaces: xcb,xlib,wayland
Audio:
Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637
class-ID: 0403
Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir,
snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63 pcie: gen: 3
speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.5
chip-ID: 1022:15e2 class-ID: 0480
Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3 class-ID: 0403
API: ALSA v: k6.7.1-zen1-1-zen status: kernel-api tools: N/A
Server-1: PipeWire v: 1.0.1 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Lenovo driver: r8168 v: 8.052.01-NAPI modules: r8169 pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 01:00.0 chip-ID: 10ec:8168
class-ID: 0200
IF: enp1s0 state: down mac: <filter>
Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
vendor: Lenovo driver: rtw_8822ce v: N/A modules: rtw88_8822ce pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 02:00.0 chip-ID: 10ec:c822
class-ID: 0280
IF: wlp2s0 state: up mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4:3 chip-ID: 0bda:c123
class-ID: e001 serial: <filter>
Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: <filter> bt-v: 5.1 lmp-v: 10
status: discoverable: no pairing: no
Drives:
Local Storage: total: 476.94 GiB used: 337.65 GiB (70.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Lenovo
model: UMIS RPJTJ512MEE1OWX size: 476.94 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 2.1C0628 temp: 35.9 C scheme: GPT
Partition:
ID-1: / raw-size: 256.64 GiB size: 256.64 GiB (100.00%)
used: 181.29 GiB (70.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 256.64 GiB size: 256.64 GiB (100.00%)
used: 181.29 GiB (70.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 256.64 GiB size: 256.64 GiB (100.00%)
used: 181.29 GiB (70.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 256.64 GiB size: 256.64 GiB (100.00%)
used: 181.29 GiB (70.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 21.36 GiB used: 62 MiB (0.3%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 48.8 C mobo: N/A gpu: amdgpu temp: 43.0 C
Fan Speeds (rpm): N/A
Info:
Processes: 416 Uptime: 1h 44m wakeups: 0 Memory: total: 24 GiB note: est.
available: 21.36 GiB used: 9.75 GiB (45.6%) Init: systemd v: 255
default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
Packages: pm: dpkg pkgs: 0 pm: pacman pkgs: 1638 libs: 434
tools: octopi,paru,yay pm: rpm pkgs: 0 Shell: fish v: 3.7.0
running-in: yakuake inxi: 3.3.31
Garuda (2.6.22-1):
System install date:     2023-06-28
Last full system update: 2024-01-25 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:

Have a look at Stacer and GNOME Disk Utility (Baobab). Stacer will scan for package cache and a few other things, and Baobab will show you the big hitters to your disk space.
Snapper will show you the snapshots themselves which you can clear up starting from the lower numbers, but it won’t show you the restored/backup snapshots. For those, you’ll need to use BTRFS assistant to delete them.
As long as you don’t need to restore those snapshots, they’re safe to delete :slight_smile:

4 Likes

You can also try Bleachbit.

1 Like

Would also like to mention clean pacman cache,

sudo paccache -rk0

adjust the 0 at the end to the number of older revs of packages you want in your cache.
and also,

paru -Scd
3 Likes

Unless one is an extremely seasoned Linux user I would avoid BleachBit like the plague. Use Stacer. I swear by it.

2 Likes

I managed to clean up a lot of space thanks to all of your suggestions.

I ran @NaN’s commands and that cleaned up about 8.5 GB of space.

Then, I checked out @lum1nuss’s suggestions. Stacer helped me clean up about 10 GB of application cache (I unchecked things that seemed alright to leave alone, like Krunner and browser cache).

Finally, Baobab helped me notice that my Unreal Engine 5 installation was somehow taking up… 176 GB of disk space. I recall the engine being a lot smaller than that… Not sure how the folder got so big. I don’t use UE5 anymore, so I just deleted it.

Snapper snapshots were ok. Snapper was configured to only save the last 10 snapshots, so I didn’t gain much from deleting the older 9 logs.

Thanks very much, everyone!

1 Like

I’d recommend also using FileLight

It’s great to visualize the space taken up by each and every file / folder

1 Like

FileLight is great, however I would also recommend QDirStat.

1 Like

True. It is a bit at the extreme side.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.