macOS doesn’t come with a utility for defragmentation and there’s no Terminal command for doing this either. But, if your Mac is really old and running slow, you can still defrag your hard drive by installing third-party software.

macOS doesn’t come with a utility for defragmentation and there’s no Terminal command for doing this either. But, if your Mac is really old and running slow, you can still defrag your hard drive by installing third-party software.