Difficulties Reinstalling Windows on bootcamp with APFS

I installed bootcamp a few years ago and now Windows is pretty hosed so I want to do a fresh install. Apple says to delete the bootcamp partition in bootcamp assistant (BCA), and then redo it.

issue is that the SSD got converted to APFS, so when I go into BCA, it immediately says: “The startup disk cannot be partitioned or restored to a single partition. The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by boot camp assistant for Installing Windows”

I read elsewhere to delete the bootcamp partition with APFS, can either use disk utility or terminal commands. But if I do that, I suspect I will get same message in BCA and won’t be able to create a new partition.

So what is best way to just nuke the bootcamp partition and re-install windows?


How to solve this error `sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set` without reinstalling ubuntu?

TLDR: I am running Ubuntu 18.04 with i3 and I messed up my permissions. Whenever I run a command with sudo, I get this error message, sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set. I am trying to figure out if I need to fully re-install Ubuntu or if this can be fixed in a less drastic way.

What had happened was: I was trying to upgrade my npm version with nvm and the nvm command was not being recognized. I followed this stackoverflow post’s instructions https://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo to copy the version of node I had active via nvm into the /usr/local. I ran the below. (Yes, I realize now that I should have investigated this series of commands before running them.)

n=$  (which node); \ n=$  {n%/bin/node}; \ chmod -R 755 $  n/bin/*; \ sudo cp -r $  n/{bin,lib,share} /usr/local 

I then got tons of errors saying chmod: changing permissions of '/usr/bin/*': Operation not permitted

After that I ran sudo nvm install-latest-npm and got the same error as I had before, sudo: nvm: command not found.

Then I tried running another command with sudo, and got the error sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set. I now get this error whenever I run anything with sudo.

I think this problem was caused by me running chmod -R 755 $ n/bin/*; \ but I’m confused because the error message said permissions for /usr/bin were not changed.
I have a two-part question: 1) What caused this error? Am I correct that it was caused by the chmod -R command? 2) Can I fix this without completely reinstalling ubuntu? If so, how?

For context, I already read these two questions sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 and this /usr/bin/sudo must be owned by uid 0 and have the setuid bit set. However, I am not sure if the advice from the first question’s answer applies to this situation, because the error message I receive is not referring specifically to /usr/lib/sudo/sudoers.so.

Thanks for reading!