"So back to the question of defragmenting. When you defrag a hard drive, especially a SSD, it will end up causing tons of small write accesses, which will reduce the lifespan of the hard drive. And since data is not being read sequentially, it doesn’t matter if the file is stored in a hundred different places, the performance will remain the same.
So, no, you should not defrag an SSD. And performing one will actually reduce the life of your drive. All of the SSD manufacturer’s know of this problem and they have come up with an optimization technique with the use of the TRIM command.
Currently, with HDDs and SSDs, if you delete some data on the hard drive, the operating system does not actually remove the content from the disk, it just deletes the pointer to the address and therefore “deletes” the data. That’s probably why you’re heard of secure delete or government security file deletion, which actually overwrites the deleted data with gibberish so no one can use advanced tools to read data later on."