Close Menu
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook X (Twitter) Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home » Windows

Solved: Cannot Delete Protected Partition

Abhishek SilwalBy Abhishek SilwalFebruary 23, 2023
cannot-delete-protected-partition

Whenever you try deleting a protected partition using the Diskpart Command-line Interface (CLI), it will show an error message saying “Can’t delete a partition without the force protected parameter set.” It is a protection feature on Windows that prevents accidental deletion of the drives that are essential to run the operating system.

The protected partitions where this feature applies include:

  • Recovery Partition
  • System or EFI System Partition (containing the boot files and the bootloader)
  • Boot Partition (containing the operating system files)
  • Page File Partition (containing the virtual memory pagefile.sys)
protected-partition

You can check for the type of partition in Disk Management (diskmgmt.msc on Run) and go to the relevant solution if you really need to delete this partition. 

If the partition doesn’t fit any criteria or is only a basic data partition, it is likely a heavily corrupted partition or a corrupted disk. In such cases, you can either try clearing the whole disk and then formatting it. If it still doesn’t resolve the issue, you need to replace the disk altogether.

Table of Contents

  • Use Override Attribute With Delete Partition
  • Change Pagefile Location
  • Change Boot Partition
  • Clear Whole Disk

Use Override Attribute With Delete Partition

It is possible to delete the recovery partition through Diskpart. However, you need to use the parameter override to force the deletion. The complete process goes like this:

  1. Open the Diskpart command line by entering diskpart on Run (Windows key + R).
  2. Then, type the following commands one by one and press Enter after each:
    • list disk (look for the number of the disk you want)
    • select disk # (replace # with the number from above)
    • list partition (same as for disk)
    • select partition # (replace # with the appropriate number)
    • delete partition override
    • exit
      delete-partition-override

Change Pagefile Location

If you try deleting the current pagefile partition on Diskpart, even with the override function, you’ll get the message- “Delete is not allowed on the current boot, system, pagefile, crashdump, or hibernate volume.” But you’ll also get the same message if the partition is the boot or system volume. So, first, try checking whether it is the pagefile partition or not.

The pagefile partition stores a pagefile.sys file that reserves the space your system uses as virtual memory. It is a hidden OS file, so you should first unhide all protected system files.

  1. Open Run by pressing Windows key + R.
  2. Type control folders and press Enter to open File Explorer Options.
  3. Go to the View tab.
  4. Check Show hidden files, folders, and drives.
  5. Uncheck Hide protected operating system files.
    show-hidden-files-and-unhide-protected-os-files
  6. Click OK.

Then, open that partition or drive through your file explorer and see if you can see the pagefile.sys file there. If so, you need to change its location so that you can delete the partition.

  1. Open Run.
  2. Type systempropertiesadvanced and press Enter to open the Advanced tab of System Properties.
  3. Click on Settings under Performance.
    system-properties-advanced-performance-settings
  4. Go to the Advanced tab and select Change under Virtual Memory.
  5. Uncheck Automatically manage paging file size for all drives.
  6. Select the partition with the pagefile, check No paging file, and click Set.
  7. Then, select another partition with enough empty space and check System managed size. It’s better to use an SSD partition or the partition with the OS.
  8. Click Set and then OK > OK > OK.
    disable-automatic-manage-paging-file-no-pagine-file-system-managed-size
  9. Restart your PC to apply the change and then try deleting the partition you want.

Change Boot Partition

Now, you need to check whether the partition of your partition is the boot partition. You can do so from the Disk Management utility.

  1. Open Run.
  2. Type diskmgmt.msc and press Enter to open Disk Management.
  3. Look for the relevant disk and partition on the lower panel.
  4. If the partition shows System or EFI System Partition, it is the current boot partition. System indicates a legacy bootloader partition and EFI System Partition indicates an EFI bootloader partition.
    efi-system-and-primary-system-partition

If the partition with the bootloader exists on the same disk as the OS, don’t try deleting it as it is an essential partition. If it exists on another disk and there is no other boot partition, you need to create a new boot partition on your primary disk to be able to delete this partition.

  1. First, you need to create a 100-250 MB partition on the other disk (the same disk that contains the OS is recommended). On Disk Management, right-click on the OS partition (that shows boot) and select Shrink Volume. Type 100-250 and click Shrink.
    shrink-volume-partition
  2. Then, create a Windows installation media and boot using the disk.
  3. On the Install screen, press Shift + F10 to open the Command Prompt.
  4. Enter the commands below depending on whether you need to recreate the legacy boot partition or the EFI system partition (same as earlier).

To create an EFI partition on a GPT disk:

  • diskpart
  • list disk (note down the disk number of the disk with the newly created partition by checking the size)
  • select disk # (replace # with the number from above)
  • create partition efi
    diskpart-list-disk-create-partition-efi
  • list volume (Note the partition number of the newly created partition by checking the size. Also, check the drive letter of the partition with the OS as it may not be C: here)
  • select volume # (replace # with the appropriate number)
  • format fs=fat32 quick (you can’t use ntfs)
  • assign letter=S: (or any unused drive letter)
    list-volume-select-volume-assign-letter-s
  • exit
  • bcdboot C:\Windows /s S: /f UEFI (replace C: with the drive letter of the partition with the OS that you got from list volume)
    exit-diskpart-bcdboot-uefi

To create a legacy boot partition on an MBR disk:

  • diskpart
  • list disk (note down the disk number of the disk with the newly created partition by checking the size)
  • select disk # (replace # with the number from above)
  • create partition primary
    list-disk-create-partition-primary
  • list volume (Check the partition number of the new partition by looking at the size. Then, check the drive letter of the partition with the OS as it may not be C: here)
  • select volume # (replace # with the partition number of the newly created partition)
  • active
  • format fs=ntfs quick label="System Reserved"
  • assign letter=S: (or any unused drive letter)
    list-volume-active-format-ntfs-assign-letter
  • exit
  • bootrec /fixmbr (to make sure the partition has a valid Master Boot Record)
  • bcdboot C:\Windows /s S:
    exit-diskpart-bcdboot-legacy

After that, try deleting the old boot partition on the other disk.

Clear Whole Disk

If you are trying to wipe the entire drive, you can use the clean command in diskpart to remove all contents of the drive including the protected partition. Also, if you have more than one boot partition on two separate disks, then you may need to clear the whole disk to delete that partition.

  1. Open Run.
  2. Type diskpart and press Enter to run this CLI.
  3. Type the following commands and press Enter after each to execute them:
    • list disk
    • select disk # (replace # with the relevant disk number)
    • clean
    • create partition primary
    • select partition 1
    • format fs=ntfs quick
    • assign letter=S: (replace S with any unused drive letter you want)
      clean-and-format-disk
fix
Abhishek Silwal
  • LinkedIn

Abhishek Silwal is an Electronics Engineer and a technical writer at TechNewsToday. He specializes in troubleshooting a wide range of computer-related issues. His educational background in Electronics Engineering has given him a solid foundation in understanding of computers. He is also proficient in several programming languages and has worked on various robotics projects. Even in his early days, he used to tinker with various computer components, both hardware, and software, to satiate his curiosity. This experience has given him a breadth of experience that goes beyond his educational qualification. Abhishek has been writing articles on dealing with varieties of technical issues and performing specific tasks, especially on a Windows machine. He strives to create comprehensive guides on fixing many system and hardware issues and help others solve their problems. You can contact him at abhisheksilwal@technewtoday.com

Related Posts

scanning and repairing drive stuck

Windows Stuck in Scanning and Repairing Drive Screen? 4 Easy Fixes

December 4, 2023
Scanning and Repairing Drive

How to Fix Scanning and Repairing Drive on Every Boot?

November 24, 2023
how to download and use rufus

How to Download and Use Rufus

September 28, 2023
how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 27, 2023
what happens if you turn off your computer during an update

What Happens if You Turn Off Your Computer During an Update?

September 18, 2023
How to Disable Integrated Graphics

How to Disable Integrated Graphics?

September 16, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
scanning and repairing drive stuck

Windows Stuck in Scanning and Repairing Drive Screen? 4 Easy Fixes

December 4, 2023
computer died

Computer Died? Here’s What You Should Do Next

December 1, 2023
how-to-share-a-printer

How to Share a Printer on Network (Step-by-Step Guide)

November 28, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 26, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook X (Twitter) Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.