Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Intermediate Declutter Checklist for Linux Users

· 5 min read · Home Tech

In this article
  1. Start With a Map of What Is Actually Using Space
  2. Clear Package Caches and Orphaned Dependencies Safely
  3. Audit Flatpaks, Snaps, and Duplicate App Formats
  4. Worked Example: Reclaiming Space on a 256 GB Laptop
  5. Clean Home Directory Caches Without Breaking Apps
  6. Set a Repeatable Monthly Check

An intermediate Linux declutter checklist should focus on the places clutter accumulates after the first round: package caches, orphaned dependencies, old kernels, duplicate flatpaks, and home-directory caches. The goal is not a bare system but a predictable one, where you know what each cleanup step removes and how to undo it. Work through the categories below in order, checking before you delete.

Start With a Map of What Is Actually Using Space

Before removing anything, measure. Open a terminal and run df -h to see which filesystem is filling. Then run du -h --max-depth=1 ~ | sort -hr | head -20 to list the largest folders in your home directory. On most desktop systems the usual suspects are ~/.cache, ~/.local/share/Trash, browser profiles, and virtual machine images.

Write down the top three folders and their sizes. This becomes your baseline. After each cleanup step, re-run the same command and compare. If a folder did not shrink, the step did not work or the files were recreated by a running program. Close the program and repeat.

Check the package manager's own report next. On Debian and Ubuntu systems, sudo du -sh /var/cache/apt/archives shows the downloaded package cache. On Fedora, sudo du -sh /var/cache/dnf. On Arch, sudo du -sh /var/cache/pacman/pkg. These caches can hold hundreds of megabytes of installers you no longer need.

Clear Package Caches and Orphaned Dependencies Safely

Package caches are the safest place to start because they hold copies of software you can download again. The command to clear them differs by distribution, so check your package manager's documentation if the command below does not match your system. Menu labels and command names can differ by version.

  1. On Debian or Ubuntu, run sudo apt clean to remove all cached package files, or sudo apt autoclean to remove only packages that can no longer be downloaded.
  2. On Fedora, run sudo dnf clean all to clear metadata and cached packages.
  3. On Arch, run sudo pacman -Sc to remove packages no longer installed, then confirm when prompted.
  4. Remove orphaned dependencies with your package manager's orphan command, such as sudo apt autoremove on Debian-based systems. Read the list of packages before confirming.

Orphaned dependencies are libraries installed for a program you later removed. They take space and are not needed. The package manager will list them before removal. If you see a package you recognize as part of your desktop environment, cancel and check why it is marked orphaned before proceeding.

Old kernels are a separate category. Most distributions keep two or three previous kernels so you can boot if an update fails. Removing all but the current and one previous kernel is reasonable. Use your distribution's tool for this rather than deleting files by hand. On Ubuntu, sudo apt autoremove often handles old kernels; on Fedora, sudo dnf remove --oldinstallonly removes older install-only kernels. Confirm the current kernel with uname -r before removing anything.

Audit Flatpaks, Snaps, and Duplicate App Formats

Many systems end up with the same application installed as both a native package and a Flatpak or Snap. Each copy can be hundreds of megabytes. List what you have with flatpak list and snap list, then compare against your native packages with apt list --installed or dnf list installed.

For each duplicate, decide which format you actually use. Keep one and remove the other. Removing a Flatpak also leaves user data and unused runtimes behind unless you clean them. Run flatpak uninstall --unused to remove runtimes no installed app needs. For Snap, sudo snap set system refresh.retain=2 limits old revisions kept, and sudo snap list --all shows disabled revisions you can remove individually.

A common misconception is that removing an app's menu entry removes the app. It does not. The package remains installed and its files stay on disk. Always remove through the package manager or the format's own uninstall command.

Worked Example: Reclaiming Space on a 256 GB Laptop

Suppose df -h shows your root partition at 91% used with 23 GB free. You run the checks and find:

  • Package cache: 1.8 GB
  • Old kernels: 900 MB
  • Orphaned dependencies: 600 MB
  • Unused Flatpak runtimes: 2.1 GB
  • Trash: 1.2 GB
  • Browser cache: 700 MB

Clearing all six returns about 7.3 GB, taking free space from 23 GB to roughly 30 GB. That is enough headroom for updates and temporary files. The arithmetic matters because it tells you when to stop. If you free 7 GB and the disk is still above 85% used, the real consumer is elsewhere, likely virtual machines, media files, or a large home directory folder you have not examined.

Repeat the measurement after each step. If the package cache step frees 1.8 GB, confirm it with df -h before moving on. This habit catches commands that silently fail because of permissions or a running service.

Clean Home Directory Caches Without Breaking Apps

The ~/.cache folder holds thumbnails, browser data, and temporary files that programs rebuild. Deleting the whole folder is usually safe while programs are closed, but some apps store settings there. A safer approach is to remove only folders you recognize and that are large.

  1. List cache sizes with du -h --max-depth=1 ~/.cache | sort -hr.
  2. Close the application that owns the largest folder.
  3. Delete that single folder, for example rm -rf ~/.cache/thumbnails.
  4. Reopen the application and confirm it still works.
  5. Empty the trash with rm -rf ~/.local/share/Trash/* after checking its contents in your file manager.

Browser profiles are the largest single cache on many systems. Clearing cache from inside the browser's settings is safer than deleting profile folders, because it leaves bookmarks, passwords, and history intact. Look for a clear browsing data option in the browser's privacy settings.

Do not delete folders under ~/.config or ~/.local/share unless you know what they belong to. Those hold application settings and data. Removing them can reset an app or lose local files.

Set a Repeatable Monthly Check

A checklist is only useful if it runs again. Pick one day a month and repeat the measurement steps, then clear only what has grown. Most systems accumulate 1 to 3 GB of cache and old packages between checks. Keep a short note of the commands that worked on your distribution so you do not have to look them up each time.

Before any removal, make sure your backups are current. Decluttering is not a substitute for a backup, and a package manager command typed with the wrong package name can remove more than intended. Read the confirmation prompt every time.

If a cleanup step feels uncertain, stop and check the package manager's manual page with man apt, man dnf, or man pacman. The manual is the authoritative source for your version, and it will list the exact flags available. That check takes a minute and prevents most accidental removals.