If your Linux system is running low on storage, you don’t need to spend hours going through files and deleting what you don’t need. There’s an easier way to do it. Let me show you what I do when I need to declutter and clear up space.
Which files are safe to delete?
Useless app files and temporary files are secretly wasting storage
We’ll be deleting two kinds of files. Personal files that you downloaded, or you don’t need on your computer. I’ll show you how you can automatically find which personal files are taking up the most space in one place. From there, you can just erase them normally.
Then there are junk or cached files that the system doesn’t need. Whenever you install or upgrade an app, the actual downloaded package is cached in storage. This cached space grows over time and wastes storage. If you use Flatpaks, their older runtimes (the shared libraries for these packages) can also take up a lot of space.
Also, kernel updates are cached as well. Whenever your Linux machine receives a new kernel update, it keeps the old kernel in storage anyway. If the new version breaks, you can just select the older version to boot into.
You check the kernel version currently in use with this command.
uname -r
This command prints a list of all available kernels on disk.
dpkg --list | grep linux-image
Each kernel package takes up some 600MB on your disk, so over time, this cache can grow pretty big. Linux doesn’t prune older kernel files automatically. It lets the user make that choice instead, which means you have to manually clear this cache if it’s taking up too much disk space.
I’ll show you how to safely clear these junk files too.
Quiz
Cloud storage and self-hosting
Trivia challenge
From Dropbox to your own home server — how well do you really know where your files live?
CloudSelf-HostingProtocolsSecuritySoftware
Which company launched the first widely popular consumer cloud storage service, debuting in 2007?
Correct! Dropbox launched in 2007 and is widely credited with popularizing consumer cloud storage. Its simple file-syncing model set the template that almost every competitor would follow for years.
Not quite — the answer is Dropbox, which launched in 2007. Google Drive didn’t arrive until 2012, and OneDrive (then called SkyDrive) only became prominent around the same time.
Nextcloud is best described as which type of software?
Correct! Nextcloud is a free, open-source platform you install on your own server to get Dropbox-like features without relying on a third party. It supports file sync, calendars, contacts, and hundreds of community apps.
Not quite — Nextcloud is an open-source, self-hosted platform. It was actually forked from ownCloud in 2016 by founder Frank Karlitschek and has since become one of the most popular self-hosting projects in the world.
Which protocol does Nextcloud and many other self-hosted storage tools use to sync files between a server and client devices?
Correct! WebDAV (Web Distributed Authoring and Versioning) is an HTTP extension that allows clients to read and write files on remote servers, making it a natural fit for cloud-style file sync applications.
Not quite — the answer is WebDAV. While FTP, SFTP, and SMB are all valid file-transfer protocols, WebDAV is the standard used by Nextcloud, ownCloud, and many other web-based storage platforms because it runs over standard HTTP/HTTPS.
What does end-to-end encryption (E2EE) mean in the context of cloud storage?
Correct! With true E2EE, encryption and decryption happen on the user’s device, so the cloud provider stores only ciphertext and cannot read your files even if compelled to. Services like Proton Drive and Tresorit are known for this approach.
Not quite — E2EE means files are encrypted on your device before they ever leave it, so the provider only ever sees unreadable ciphertext. This is different from standard server-side encryption, where the provider holds the keys and could theoretically access your data.
What is a NAS, commonly used in home self-hosting setups?
Correct! A NAS (Network-Attached Storage) device connects to your home router and makes its hard drives accessible to every device on the network. Popular brands include Synology, QNAP, and Western Digital, and many run apps like Plex or Nextcloud.
Not quite — NAS stands for Network-Attached Storage. It is a purpose-built box with one or more hard drives that plugs into your router, letting all devices on your network access shared storage without needing a full PC running 24/7.
Which cloud storage service is natively built into macOS and iOS, deeply integrated with Apple’s ecosystem?
Correct! iCloud Drive is Apple’s built-in cloud storage service, tightly integrated into macOS, iOS, and iPadOS. It handles desktop and document folder sync, app data, photos, and more, all within Apple’s walled garden.
Not quite — the answer is iCloud Drive. While OneDrive, Google One, and Dropbox all have iOS and macOS apps, iCloud Drive is the service Apple built directly into its operating systems, making it the default for most Apple users.
Which open-source media server software is frequently self-hosted to stream a personal video and music library to any device?
Correct! Jellyfin is a fully free and open-source media server that you host on your own hardware. It streams your personal library of movies, TV, and music to browsers, apps, and smart TVs — with no subscription or tracking involved.
Not quite — the answer is Jellyfin. VLC and Handbrake are local playback and transcoding tools, while Kodi is a media center app rather than a server. Jellyfin (and its proprietary cousin Plex) are specifically designed to serve media over a network.
When self-hosting a service and exposing it to the internet, which tool is most commonly recommended to securely provide remote HTTPS access without opening router ports directly?
Correct! A reverse proxy like Nginx Proxy Manager or Caddy sits in front of your self-hosted apps, handles SSL/TLS certificates automatically, and routes traffic securely. This avoids exposing individual app ports directly and centralizes access control.
Not quite — the standard answer is a reverse proxy such as Nginx Proxy Manager or Caddy. Telnet is unencrypted and obsolete, RDP exposes the whole desktop and is a common attack target, and plain FTP lacks encryption, making all three poor choices for secure remote access.
Your Score
/ 8
Thanks for playing!
Run the disk usage analyzer
Look up what’s hogging disk space
The first thing you’ll want to do is install a tool called Disk Usage Analyzer. The package name is baobab. You can install it on Debian, Ubuntu, and their distro derivations with this command.
sudo apt install baobab
On Fedora systems, try this.
sudo dnf install baobab
Arch users can install with pacman.
sudo pacman -S baobab
Once installed, run it through the app launcher by searching for “disk usage analyzer.” Alternatively, you can launch it from the terminal with this command.
baobab
The main screen will show you a list of your storage drives, alongside their total and available storage. Let’s say you want to clean up the system directory. Mine is called “mx.” When you click it, it’ll take a couple of minutes to populate the data (depending on the size of your drive).
On the right side, you’ll see a visual representation of your directories. The bigger the block, the more space it takes up. You can switch between ring chart and treemap views. On the left pane, you’ll see a list of directories and their details—which folders are taking up the most space, how many items, they have, and the percentage points for each directory, etc.
You can click on directory names to expose the directory structure and learn more. For example, I can see my user directory is taking up some 27GB right now, and about 10GB of that is sitting in the hidden .local folder. Half of that is trash and the rest is font files and my Steam files. I can also zoom back out and see that Flatpaks are hoarding 6GB. You can run a similar analysis on the drives where you keep your personal files. It’ll help you flag and delete files you no longer need.
You can also hover over the visual blocks to see their labels. When you click a block, the app will show their details on the left pane. This works in both treemap and ring chart views.
To clear a file or directory using this disk analysis tool, right-click on the file or folder name and then select “Move to Trash.” If you want to view the file beforehand, you can instead copy the file path or open it in the default file manager.
- Brand
-
Zettlab
- CPU
-
RK3588
- Memory
-
16GB LPDDR4x
- Drive Bays
-
4x 3.5-inch, 1x M.2 NVMe
The Zettlab D4 NAS features four 3.5-inch hard drive bays with a M.2 NVMe SSD slot, perfect for your home storage server needs. The powerful RK3588 chip features built-in AI acceleration that is leveraged throughout the OS. There’s also a built-in SD and microSD card slot on the front for automatic backup of your photos, videos, and more.
Frees up storage with one click
The MX Cleanup tool comes preinstalled with MX Linux. It gives you an easy interface to clear all those junk system files we talked about. If you’re on MX Linux too, you can run it with the default selections, and it should instantly clear up some storage for you. In the tools section, there’s even an option to safely remove unused Linux kernels.
On other systems, you can try Bleachbit. It does the same things with a few extra features.
sudo apt install bleachbit
Use the same package name to install it with dnf or pacman.
When you launch bleachbit, it’ll show you a checklist of items you can delete. You can check the entire APT section, for example. You can scroll down to the System category and check cache and temporary files. You can also select the options under Deep Scan to erase things like thumbnail data and other temporary files.
Then just hit the “Clean” button. Wait for it to scan and erase the data. As you can see, it automatically cleaned up almost 4GB of storage for me. I’d already run it before, otherwise it would have been a higher number.
Run these cleanup tools periodically to quickly free up some storage
It takes less than five minutes to use a disk analyzer and an automated cleanup tool like Bleachbit or MX Cleanup to reclaim disk space.








