Skip to Content

How to Trim Unallocated Space on SSD after Shrinking Partition

If you have shrunk a partition on your SSD, you may notice some unallocated space left behind. This space is not usable by the operating system and can affect the performance and lifespan of your SSD. In this article, you will learn how to trim unallocated space on SSD using Windows tools or third-party software.

What is Unallocated Space on SSD?

Unallocated space on SSD is a portion of the disk that does not belong to any partition or volume. It is usually created when you delete, resize, or clone a partition. Unallocated space cannot store any data and does not have a file system.

How to Trim Unallocated Space on SSD after Shrinking Partition

Why Trim Unallocated Space on SSD?

Trimming unallocated space on SSD is a process that tells the SSD controller to erase the invalid data blocks and mark them as free. This can improve the write performance and endurance of your SSD, as well as prevent data corruption and fragmentation.

Trimming unallocated space on SSD is different from defragmenting a hard disk drive (HDD). HDDs use spinning platters to store data sequentially, and they need to be defragmented to reduce the physical movement of the read/write head. SSDs do not have any moving parts and can access data randomly, so they do not need to be defragmented.

However, SSDs have a limited number of write cycles, and they need to perform a garbage collection process to reclaim the space occupied by deleted or invalid data. This process can slow down the SSD performance and reduce its lifespan. Trimming unallocated space on SSD can help the garbage collection process by informing the SSD controller which data blocks are no longer needed and can be erased.

How to Trim Unallocated Space on SSD using Windows Tools?

Windows 10 and 11 have a built-in tool called Optimize Drives that can trim unallocated space on SSD automatically or manually. To use this tool, follow these steps:

  1. Open File Explorer and right-click on This PC. Select Properties from the context menu.
  2. Click on Tools in the left pane and then click on Optimize under Optimize and defragment drive.
  3. Select your SSD from the list and click on Optimize. This will trim the unallocated space on your SSD and optimize its performance.

Alternatively, you can use the command-line tool Diskpart to trim unallocated space on SSD. To use this tool, follow these steps:

  1. Open the Start menu and type cmd. Right-click on Command Prompt and select Run as administrator.
  2. Type diskpart and press Enter. This will launch the Diskpart utility.
  3. Type list disk and press Enter. This will show you the disks connected to your computer.
  4. Type select disk n and press Enter, where n is the number of your SSD.
  5. Type list partition and press Enter. This will show you the partitions on your SSD.
  6. Type select partition m and press Enter, where m is the number of the partition that has unallocated space after it.
  7. Type shrink desired=n and press Enter, where n is the amount of unallocated space in megabytes that you want to trim. For example, if you have 10 GB of unallocated space, type shrink desired=10000 and press Enter.
  8. Type exit and press Enter to close the Diskpart utility.

Conclusion

Trimming unallocated space on SSD is a good practice to maintain the health and performance of your SSD. You can use Windows tools or third-party software to trim unallocated space on SSD easily and safely. However, before you do so, make sure you have backed up your important data to avoid any data loss.