You don't need to. You only need to defragment your disk if your
operating system is incapable of keeping the fragmentation under
control, and Linux does not suffer from this problem.
Many people say so, but it is not true.
Ext2 takes some precautions to reduce fragmentation a bit (in comparison with
(V)FAT), but ext2 can't prevent it. And it is not a feature of 'Linux' it is
a feature of the filesystem.
Jiann-Ming Su posted a link, which talks about two possibilities to defragment
your discs: either use defrag (but make a backup before!) or just make a
backup, clean your partitions and restore the backup.
I did the last thing (after using my system for ~2 years for ~10 hours a day,
making updates every day) and my system booted about 30% faster. Now, after a
year or so, it seems to be time to do it again (booting became slower and
slower).
Regards, Tim