How to delete a dead windows partition (dual boot) safely (NTFS)

I have been using CachyOS as my main OS for a long time now, without the need for Windows, but somewhere along the way my windows partition also became corrupted and I am unable to boot into it sucessfully, so I am looking to (finally) remove it entirely. I am fairly competent at basic Linux tasks but concerned about the laptop becoming unuseable if I am not cautious in deleting the windows partition. My dual boot partition is set up on a single laptop hard drive, and formatted as NTFS (as far as I can tell), I have Gparted and Timeshift installed but I don’t know how to use them properly, so if anyone could provide a simple, direct guide to remove the partition without damaging my system (or ideally, a reinstall of CachyOS being required), I would be grateful.

Hello and welcome back,

If you have gparted then you can use that to

  • select the partition
  • then Delete (may be a trash can icon)
  • then Apply All Operations (may be a check mark icon)

All done. :slight_smile:

If you had it also available in your boot loader/manager then you may want to update or refresh that as well, ex;

sudo grub-mkconfig -o /boot/grub/grub.cfg

(See more here: Boot Manager Configuration | CachyOS)

Thank you for this, to be clear there is no risk to the system if I handle it this way? No need for reinstall, potential lost files etc? (to be clear, I don’t have any crucial files on my windows partition), and Gparted will reallocate the storage space to my CachyOS install?

Below is a screenshot of my partitions, which would need to be deleted?

OK this looks bigger and took longer to type than the procedure is actually difficult.

Of course obligatory ā€œyou are messing with your data. if its super important and you are not super careful then you will want to have made backups.ā€

Oh and you will need to do the gparted steps on the existing root/linux partition from some other system like a live ISO because you cannot make these kinds of changes to a mounted partition. And you could not be using a system with an unmounted root partition. Though you should be able to finalize the last 2 commands from within the installed system.

The windoze partition should be entirely separate.

I suppose there could have been the off chance that some data you want is there and that idea was neglected until now. Though I doubt that would be the case. And if it were you surely would have noted your missing photos or games or what not.

And as mentioned in the opening post - its currently fragmented in some way in any case so it could not possibly be in use, right?

Ah well that checks that off for sure then.

That will not happen automatically.
You will simply have a chunk of unallocated free space the size of the partition that was just removed.
You could then create new partition(s) there or make use of it some other way like growing an existing partition.
I think I see where this is going .. we will come back to this.

Given the example there I would have to assume that /dev/nvme0n1p3 is the windoze partition.

( Some others exist that are related - nvme0n1p2 and the unlabeled nvme0n1p4 that is a likely MS recovery partition. It is up to you whether to similarly deal with these in any way. )

So just to again cover that we are sure there is nothing we are going to miss on that partition?

If confirmed then proceed with the following;

  • Select /dev/nvme0n1p3 (1.35TiB)
  • Select Delete (this is a circle+x icon in your example)
  • Select Apply All Operations (this is a checkmark icon in your example)

Thats it. It is deleted.

But we probably want to use that space for something?

I would probably suggest, no matter the next steps unless you have an idea for the perfect alternative to fill the space, to move (not resize!) the linux btrfs (/dev/nvme0n1p5) partition as far left as possible. You can do this using your mouse and the boxes between the icons and the text list. This will allow you to grow into that space as much as you like in the future or following steps.

So now your partition is on the far left. You can similarly use the edge of a box to drag it to resize. Using the right-edge of your partition pull it to the right into the newly open space. This is important! Only resize to the right! When you are done hit Apply.. like you did for the deletion above.

You can close gparted.

With that done we just have to tell btrfs about it;

sudo btrfs filesystem resize max /

And our boot manager, ex for grub;

Thanks for the more detailed reponse, I’ll give it a thorough read through before doing anything, and post more questions.

I have questions about this part, so will I need to run Gparted via a live ISO even if I don’t need to backup any of the data from my Microsoft partition?

Sorry .. I meant that would be true for any interaction with the (linux) root partition (such as moving or resizing).

You can freely delete the ntfs partition from your installed system.

If, for example, you do not intend to touch the existing root partition but instead want to create a shared ā€œDataā€ partition in the space relieved by the deletion .. then you need not boot anything else.

Ok, so all I would need to do is the following then? (via my installed system)

  • Select /dev/nvme0n1p3 (1.35TiB)
  • Select Delete (this is a circle+x icon in your example)
  • Select Apply All Operations (this is a checkmark icon in your example)

Thats it. It is deleted.

But we probably want to use that space for something?

I would probably suggest, no matter the next steps unless you have an idea for the perfect alternative to fill the space, to move (not resize!) the linux btrfs (/dev/nvme0n1p5) partition as far left as possible. You can do this using your mouse and the boxes between the icons and the text list. This will allow you to grow into that space as much as you like in the future or following steps.

So now your partition is on the far left. You can similarly use the edge of a box to drag it to resize. Using the right-edge of your partition pull it to the right into the newly open space. This is important! Only resize to the right! When you are done hit Apply.. like you did for the deletion above.

You can close gparted.

With that done we just have to tell btrfs about it;

sudo btrfs filesystem resize max /

And our boot manager, ex for grub;

This part, as written, is all involving the existing root partition - this cannot be unmounted while using that same system. So all those actions would need to be performed from a live ISO or similar instead.

It really just depends what you want to do.

But if you intend to increase the size of your root linux partition you are going to need to do it from another system like a live ISO.

Just want to say thanks for being patient and complete in your explanation, that can be rare in the linux world at times. If I am understanding you correctly(if I am way off base please let me know), just deleting the windows aspect of the partition will allow the space to be used, if I wanted to just to continue to use the partition minus the windows ā€œjunkā€, but merging it and removing the partition entirely would require the use of a live ISO?

You would technically be needing to delete the NTFS partition and then create a new one there .. or just ā€˜reformat’ the partition in one go, which will also obliterate the data on it while also converting to whatever given filesystem (or the same filesystem).

But yes, you could do that with no need for a second system or ISO.

Removing the NTFS, or any other unrelated, partition should be fully doable without a secondary system.

Its just the root/linux/btrfs/nvme0n1p5 partition .. doing anything with that cannot be performed from that partition. Thats the one you boot in to when you are using Cachy. You cannot unmount it and move it around at the same time Cachy is running or from within Cachy.

No worries, thanks, and sorry for the small confusions that might have made this a little less smooth of an intro than it could have been. :sweat_smile:

Hello, I finally got around to reszing and removing windows, and it went fantastically (sorry for ressurecting and old thread), the partition I wasn’t sure about was the nmve0n1p4, ntfs which was not allocated as windows related in any way. I am unsure as to what it is being used for, any ideas? otherwise thanks again for your help.