Upgrading from Yosemite to El Capitan, but not Sierra [duplicate]
Solution 1:
You don't have to upgrade to macOS Sierra if you don't want to.
Already "Own" El Capitan
If you have already "purchased" El Capitan, then it will show up under the "Purchased" tab of the App Store. By "purchased" I mean the "free download" that Apple provided.
Download from the AppStore
Per Apple Support, you can download El Capitan directly from the AppStore
Go to an Apple Store
If you still can't download, you can take a visit to an Apple Store near you, or you could have a friend download it (if they already purchased it) and make a USB installer.
Solution 2:
Apple has a support document specifically for this: Upgrade to OS X El Capitan
Solution 3:
None of this works if your machine CAN upgrade to Sierra. There is no path for people who need El Capitan but haven't already got it.