A complete guide to real clean flash
Download minimal ADB and fastboot binaries.
Install usb drivers of your device.
Download custom recovery image of your device. Treble supported devices need to download treble supported recovery.
Switch off the phone. Press power+volume down to enter fastboot mode. Connect it to pc.
Right click while holding shift in the ADB and fastboot folder. Click 'open command window here'.
Type fastboot devices and confirm if your phone is connected properly. If a device shows up, it's yours.
Copy the recovery image to the adb and fastboot folder and rename it recovery.
Next step only for Snapdragon chipset users. Mediatek devices have problems while using this command. Skip this step if you don't plan to erase everything from the phone.
Type fastboot -w
This wipes out your entire partition including internal storage.
Type fastboot flash recovery recovery.img
Then fastboot boot recovery.img
As the phones boots into recovery. Internal storage will be accessible on the pc. Copy the ROM, gapps and lazy flasher.
Click install on the phone and click on the ROM zip. Then click on add files and click on gapps. Then add lazyflasher.
Swipe to flash. Wipe dalvik/cache once completed. Reboot system.
Enjoy the new OS on a clean device.