Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux can run short of disk space in two different ways: the filesystem can run out of data blocks, or it can run out of inodes needed to create files. Check both with df -h and df -i, then use du and carefully scoped searches to identify what is consuming the affected filesystem before removing anything.

Check whether the problem is disk space or inode exhaustion

Block capacity and inode capacity are separate resources. A filesystem may have room for more data but no inodes left for new files; the reverse can also happen. GNU df reports the filesystem containing a path, while GNU du estimates usage by examining a directory tree. Their totals may differ because they answer different questions.

  1. Check block usage with df -h. The -h option displays sizes in human-readable units. To focus on a particular filesystem, provide a path on it, such as df -h /var.

  2. Check inode usage separately with df -i, or scope it to a path with df -i /var. Look at the inode availability and use percentage, not just the byte-capacity columns.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
    • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
    • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
    • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
    • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
    • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  3. Use the affected mount point in the next steps. Cleaning a different filesystem will not resolve the capacity problem you identified.

GNU’s df manual describes -i as reporting inode information instead of block usage. On other Unix-like platforms, options may differ; POSIX documents filesystem space and file-slot reporting, but GNU-specific options should not be assumed to exist everywhere.

Find which directories use blocks or inodes

Compare top-level directory usage

Run a shallow scan of the affected mount point. For example, if the mount is /, use:

sudo du -xhd1 /

GNU du recursively estimates device usage. Here, -d1 limits the displayed depth to one directory level, -h makes sizes easier to read, and -x prevents crossing into other filesystems. Check the installed du version’s help or manual if an option is unavailable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For inode counts, use GNU du’s inode mode:

sudo du --inodes -x -d1 /

Replace / with the actual mount point. Then repeat the scan on only the directories that look responsible—for example, sudo du -xhd1 /var—rather than repeatedly traversing the entire system.

Understand why totals may not match

  • df reports the filesystem’s overall state; du estimates usage by traversing visible directory entries. Their reported totals need not match.

  • du reports allocated device usage by default. Apparent file size can differ from allocated usage, including for sparse files.

  • Symbolic-link behavior matters: POSIX du does not follow symbolic links by default, so a scan may not include the target’s contents.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #3
    Sale
    Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
    • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
    • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
    • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
    • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
    • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  • A scan limited with -x will not include data on nested mounts. That is useful for isolating one filesystem, but check another mount separately if it may also be full.

See the GNU du manual for the documented options and the distinction between apparent size and device usage.

Identify candidate files without deleting blindly

Once a directory is implicated, search only within that subtree for old or unusually numerous files. A search identifies candidates, not files that are safe to remove. Check each candidate’s purpose, owner, and whether a service or user still needs it before taking action.

For example, preview files larger than 1 GiB under a confirmed target directory:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
find /var/log -type f -size +1G -print

Change /var/log to the relevant subtree. Treat the output as an inspection list; do not append a deletion action until you have established what each file is and that removing it is appropriate.

When passing matches from find to another command, use NUL-delimited names so filenames containing spaces, quotes, or newlines are handled correctly:

find /path/to/inspect -type f -print0 | xargs -0 -r ls -l

The GNU find manual explains why ordinary newline-delimited find | xargs processing can misparse filenames and documents the NUL-delimited approach.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Free space with a targeted cleanup

Use the result of the scan to choose what to remove

Remove or archive only data you have identified and no longer need, following the relevant application or distribution’s guidance. The right action depends on what the scan found: deleting a large file can recover blocks, while removing many small files may help when inode capacity is the problem. Do not remove system files merely because they appear large or numerous.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Package caches, container images, application data, and filesystem-specific cleanup require different procedures. Consult the documentation for your distribution, package manager, container runtime, or application before using a cleanup command; there is no universal command established for all Linux systems and workloads.

Reduce systemd journal usage when it is a confirmed contributor

On a system that uses systemd, inspect journal usage first:

journalctl --disk-usage

If archived journals are a significant contributor and you have chosen a retention target that fits your operational needs, you can remove eligible archived files by size. For example:

sudo journalctl --vacuum-size=1G

1G is an example limit, not a generally safe setting. Journal vacuuming removes eligible archived journal files, not active files, so the requested limit does not necessarily equal the total journal footprint. The journalctl manual documents vacuum options; journald.conf documents journal size and free-space controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify that the cleanup fixed the right resource

After a cleanup, recheck the affected filesystem with both commands:

df -h /path/on/filesystem
df -i /path/on/filesystem

Compare the relevant block and inode figures with the values you saw before cleanup. If the exhausted resource did not improve, the files removed may not have been on the affected filesystem or may not have addressed the limiting resource. Continue diagnosis at the relevant mount point rather than deleting unrelated files.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.