0

This question already has an answer here:

I am seeing declines in performance. Is there a disk or file defragmentation utility for Ubuntu? If so, where can I get it?

Thank you.

marked as duplicate by user.dz, Kevin Bowen, Pilot6, andrew.46, Ron Jun 24 '16 at 13:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

EXT4 under Ubuntu has no need for defragmentation like Windows does, due to the efficiency of the filesystem. It more or less automatically takes care of all of this for you on the fly.

If you really want to defrag your system (which can be a really bad idea), a guide is available here. To sum it up, run the following command to work on the whole system:

sudo e4defrag -c /

It will spit back output as it works. If no output returns, the system found nothing to defragment.

Not the answer you're looking for? Browse other questions tagged or ask your own question.