I wanna reset everything

Looking for help. Cannot find a way to do this, i simply want to delete everything on my pc. Just wipe everything, as it was after buying it. Tried to do anything, but onlly was able to clean up some the files in fedora39 and nothing else. I would want to just erase all os and do a clean install, as if pc was just bought. Anybody can help with that?

I guess you can do it with a Fedora workstation ISO. You need to write the ISO to a USB drive, boot your PC with that live USB drive, and start from Fedora Live environment.

Then, run the following commands in terminal:

sudo dd if=/dev/urandom of=/dev/<target drive> bs=4096  
sudo dd if=/dev/zero of=/dev/<target drive> bs=4096

After the wipe is complete, you can proceed to do a clean install.

This extreme is far from necessary.

Simply boot the install media then when starting the installation select the automatic install and select to reclaim the space and use the entire disk. That will wipe out all the existing partitions and create all new for this installation.

The suggested wipe using dd, while overwriting everything with random and zeros, may take an extreme amount of time. The time required would depend upon the size of the drive involved and could realistically take well over 24 hours running those 2 dd commands. It gains nothing unless you have a lot of data on that drive that you wish to be forensically unrecoverable.

1 Like

I was initially considering suggesting a reinstallation. However, I thought it may not be appropriate in this case. The op mentioned attempting to delete everything on their PC, which leads me to believe they’ve already undergone several rm -rf / commands and reinstallation processes. And these steps should have already wiped everything clean.

But you’re correct, the purpose of the commands is to overwrite the hard drive, which is a time-consuming process. I should have mentioned it.

I understand, but really the only reason for a wipe as you suggest is to remove any potential for forensic data recovery. For the great majority a reinstall with the repartitioning is more than adequate.

Note also that if using an SSD the format you show would involve millions of writes to that SSD and could easily push it to or beyond the lifetime limit of writes so should not be done unless absolutely necessary. Each 4k block would count as a single write so 4 GB would be 1 million writes.

When a HDD is used it does not have the same limitations so the risk is much less.

1 Like

You can also boot up from the iso and use gparted to erase the drive.If it’s not installed just install it on the iso and erase the drive.

1 Like