Tools for defragging Linux
Tidy Up

You may not need to defrag your Linux system very often, but the tools are waiting when the need arises.
Everyone knows that defragmenting a filesystem on Linux is unnecessary. However, like much of what everyone knows, that idea is only partly correct. Why else would Linux include utilities such as e2freefrag
, filefrag
, e4defrag
, and fsck
to allow you to check fragmentation and fix it?
Defragmenting is a means of improving how files are stored on a hard drive. In a filesystem like FAT32, files are written as close to the start of the disk as possible for quick access. However, when existing files are edited, this tactic often means there is no room to store the changes in the same space as the original file. Instead, the changes have to be stored someplace else, which causes defragmentation and can slow the system.
By contrast, Linux's ext2, ext3, and ext4 filesystems write new files with space between them. When a file is edited, the drive usually has space to store all the contents together, using space immediately after the original file. As a result, fragmentation is minimal under many conditions, so defragging does little to improve performance. In fact, if you have a true solid state drive – as opposed to the hybrid drives often sold as solid state – defragmenting becomes an obsolete concern on any operating system.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
Dash to Panel Maintainer Quits
Charles Gagnon has stepped away as maintainer of the popular Dash to Panel Gnome extension.
-
CIQ Releases Security-Hardened Version of Rocky Linux
If you're looking for an enterprise-grade Linux distribution that is hardened for business use, there's a new version of Rocky Linux that's sure to make you and your company happy.
-
Gnome’s Dash to Panel Extension Gets a Massive Update
If you're a fan of the Gnome Dash to Panel extension, you'll be thrilled to hear that a new version has been released with a dock mode.
-
Blender App Makes it to the Big Screen
The animated film "Flow" won the Oscar for Best Animated Feature at the 97th Academy Awards held on March 2, 2025 and Blender was a part of it.
-
Linux Mint Retools the Cinnamon App Launcher
The developers of Linux Mint are working on an improved Cinnamon App Launcher with a better, more accessible UI.
-
New Linux Tool for Security Issues
Seal Security is launching a new solution to automate fixing Linux vulnerabilities.
-
Ubuntu 25.04 Coming Soon
Ubuntu 25.04 (Plucky Puffin) has been given an April release date with many notable updates.
-
Gnome Developers Consider Dropping RPM Support
In a move that might shock a lot of users, the Gnome development team has proposed the idea of going straight up Flatpak.
-
openSUSE Tumbleweed Ditches AppArmor for SELinux
If you're an openSUSE Tumbleweed user, you can expect a major change to the distribution.
-
Plasma 6.3 Now Available
Plasma desktop v6.3 has a couple of pretty nifty tricks up its sleeve.