Can I Delete a Partition Without Losing Data?

You can do it; it just takes steps.

Disk Partitions
Disk partitions. (Screenshot: askleo.com)
Deleting a partition is a destructive operation, but that doesn't mean you have to lose the data it contains.
Question: Is it possible to remove a partition and have its data left behind? I do need the data, just not the partition.

No.

But… yes.

There are ways of doing what you ask; it’s just not as simple as your question implies.

TL;DR:

Deleting a partition without losing data

Deleting a partition is a destructive operation, effectively erasing all the data in the partition. This is easily handled by copying that data elsewhere prior to the delete and then restoring it to the desired location when done.

Partitions

A partition is just a way to sub-divide a disk1 into separate fixed areas. In the example disk above, you can see that my one-terabyte drive is divided into five partitions, ranging from 650 megabytes to almost 940 gigabytes.

Each area is a fixed size, meaning the space used remains the same regardless of whether or not there are actually any files there. This differs from folders, which take up only the space of its contents plus a little overhead.

Partitions are generally treated like disks — in fact, the “C:” drive on my system is simply one partition among the others. The others don’t have drive letters attached, but they’re still treated as independent disks.

Deleting a partition

Deleting a partition is very similar to deleting a folder: all of its contents are deleted as well. Just like deleting a file, the contents can sometimes be recovered using recovery or forensic tools, but when you delete a partition, you’ll delete everything inside it.

That’s why the direct answer to your question is no, you can’t just delete a partition and keep its data.

You need to take additional steps.

Back up and restore

The way to retain the data in a partition prior to deleting it is to back it up first.

Backing up — either by making an image of the partition or copying all the files it contains elsewhere — ensures that no data is lost when the partition is deleted. You can then restore the files — again, either from the image or by copying the files from wherever they were kept — to wherever you want them to live after the partition has been deleted.

Honestly, before you go playing with partitions on a hard disk, I recommend taking an image backup of the entire disk anyway. As a side benefit, you can recover/restore the files previously in this partition from that backup.

Growing an adjacent partition

Typically, when people ask this question, they’re in a situation like this:

  • One partition has a lot of files and is quite full — usually the C: drive.
  • Another partition on the same drive has some files but is not full. Often this is the D: drive.
  • The person wants to get rid of D: and allocate all its space to C: without losing any of its files.

The process is fairly direct.

  1. Back up the entire hard disk — both or all partitions — for safety.
  2. Copy the files from D: to C: if there’s room.
  3. If there’s no room, copy the files from D: to an external hard drive or some other location. (Technically you could use the backup for this, as it is a copy, but I prefer to keep the backup untouched through this effort.)
  4. Delete the D: partition.
  5. Extend the C: partition into the space freed up by deleting D:. Deleting and extending partitions can often be done with Windows’s own built-in disk management tool. If not (perhaps the partitions are laid out in a sequence the Windows tool can’t cope with) there are third-party tools that can do the job.
  6. If you had to copy the files to an external drive, copy them back, this time to the newly expanded C: partition.

Not all partitions should be deleted

In the image above, you’ll see that several of the partitions on my disk are labeled “recovery” partitions. You may find partitions on your disk with an assortment of other names.

In general, you should not delete those partitions — at least not without understanding the ramifications. Recovery partitions, for example, contain diagnostic tools, a fresh copy of the Windows operating system, and more to be used to recover or repair your computer when things aren’t working properly. Other partitions often contain manufacturer-specific tools.

You should really only consider partitions containing your data — generally already assigned a drive letter in Windows — for deletion or consolidation, using the steps outlined above.

Do this

The bottom line is simple: deleting a partition deletes everything within it, so make a copy of the data elsewhere first. Then you can restore that data whenever, wherever, and however you like.

Then, subscribe to Confident Computing! Less frustration and more confidence, solutions, answers — including partitioning tips — in your inbox every week.

Podcast audio

Play

Footnotes & References

1: For this discussion, either HDDs or SSDs.

9 comments on “Can I Delete a Partition Without Losing Data?”

  1. First, thanks for all the valuable information you provide.

    I think it’s worth mentioning that, while you can backup “data” from D: and later move it to C:, any executable programs installed on D: cannot be moved along with the data and maintain functionality since the system will be looking for these programs on drive D:. Due to slowly decreasing space on C:, I have begun installing programs on D:, but saw that didn’t prevent some space on C: from being used anyway during the installation.

    One thing that I think could enhance Microsoft’s image with users would be to develop a method to move a program from one drive to another, searching the system for references to the program and modifying them to reflect the new location. Then, again, maybe there is and I’m just behind the times.

    Reply
    • There isn’t and I’m not sure I’d trust it if there was. Programs can have so many “private” places to keep information that there’s no tool that could know about them all in order to update them. The “right” way to move a program installed on D: to C: is to uninstall it, and then reinstall it. Depending on the program that can be painful, or simple.

      Reply
  2. Hi. Thanls for all the help Leo.
    I had two drives in my pc. I used one as main drive wirh 3 partitions and the other one a backup with the same 3 partitions and files. I wanted to update from windows 7 to windows 10 with only 1 partition, so I deleted the partition in one of the drives but couldn’t install the new os.
    Unluckilly the other disk failed and I lost all my data while i was backing it up to dropbox (paid). I havn’t writtwn any data on the disk withot partition nor fosmated it, so thr data must be rhere. The other disk doesn’t boot but can be accesed from another pc, but i can’t coy it’s contents to another disk.
    Any suggestions how to recover the data?

    Reply
  3. At one time I thought had a disc utility that allowed you to move a partition (like if you had two partitions on a drive ex: C:250GB and D: 750GB to C:500GB and D:500GB) without loosing the data. Is there such a utility? Or am I wrong.

    Reply
  4. Dick D,

    GParted live (https://gparted.org/livecd.php) is used to create a bootable CD or USB drive that contains the open-source application GParted (the Gnome Partition Editor). It can non-destructively resize and move partitions as well as delete them on/from a disk.

    When you download it, you get an .iso image file. You then use one of many utilities to extract its contents to a CD disk or USB drive. I use rufus (https://rufus.ie/en/) to transfer .iso images to USB drives here.

    I strongly suggest you back up the entire disk on which you intend to move or resize partitions before you make any changes, to protect your data, just in case . . .

    After you create the bootable USB drive, restart your computer to boot from the USB drive (you may have to change/adjust settings in your BIOS/UEFI or temporarily disable secure boot). Once you boot into the live session, you can use gparted to work with your partitions.

    Another similar solution, but with several great system rescue/repair/recovery utilities is System Rescue (https://www.system-rescue.org/). It includes GParted as one of the utilities. I use it for partition management and disaster recovery. It also provides testdisk, a utility used to recover deleted files, directories, and even partitions. You can read all about it on their website if you are interested.

    I have absolutely no affiliation with any of these sites or projects. They are simply utilities I use for my own benefit and with which I have had great success, and they are all free to download and use.

    I hope this helps,

    Ernie

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.