To perform a clean install, you should create a bootable USB drive (at least 16GB). El Capitan full installer - Apple Support Community
Double-click Install OS X El Capitan.app in Applications. This will upgrade your current macOS without erasing data.
✅ The installer (approx. 6.2 GB) will download to your Applications folder as a file named InstallMacOSX.pkg (older) or Install OS X El Capitan.app .
Inside, you will see InstallMacOSX.pkg . Double-click this package.
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSB --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
If the hash matches, your download is authentic and complete.
Here is the complete, step-by-step content covering how to download the macOS El Capitan installer.
shasum /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg
Use Terminal to make a bootable USB drive (minimum 16 GB USB stick):