For a physical machine:
for f in $(lsblk | grep disk | cut -d ' ' -f 1); do sudo dd if=/dev/zero of=/dev/$f bs=4MB status=progress; doneThat will remove all your current software problems. You’ll have new ones, but the old ones will be gone.
There aren’t any software problems if you don’t have any software

Nice that you added “status=progress” so I can closely follow what is happening.
Gotta have that progress bar, otherwise you might be tempted to <Ctrl>-C and you will be left with some of your software problems.
This is helpful but can I use a larger block size? Any performance implications, security risks, etc?
Yes, and you can probably get better performance with different block sizes. This is just what I used to fix drives as it was fast enough and I couldn’t be arsed to do any real testing to find the right speed. Also, my stash of drives was no where near homogeneous, so the right size for one type of drive may not have worked for a different type of drive. I also used the 4MB block size when imaging drives to have an ok-ish speed while not losing too much data if there were read errors.
…and then you realize the production database was still mounted
Straight to the void where it belongs
Spoken like someone who never accidentally typed something into the wrong terminal or accidentally used the wrong keyboard.
Why not just delete the drive for the virtual machine? I don’t know, spinning up a new machine takes me less than a minute so personally I prefer a clean start with new device settings.
Some men just want to watch the world burn.
Because you want to see what and how it happens if you execute that command.
You need to mount / as /mnt/disk in the VM to have the trick work
What happens
Removes french language pack!
And all others
your terminal turns into the 4th of july with all the file paths it echoes
Thanks for the answer!







