The generation of electricity is somewhat problematic due to the fact that the big contributor in generating electricity is also a big contributor in accelerating global warming and climate change. With the presence of historical demand of electricity in Indonesia, power plant capabilities, operational cost, and assets cost of electricity generation in Indonesia, we can forecast electricity demand in 2030 and 2050. In addition, optimization by using Lingo Program, which includes 13 decision variables consists of PLTA, PLTU, PLTG, PLTGU, PLTP, PLTD, PLTMG, PLTS, PLTB, PLTBM, Independent Power Producer (IPP), Rented Unit, and PLTU CCS, could be done to foresee the possible scenario of electricity generation that was divided into (1) when coal power have no limitation, (2) when capacity of coal reduced and replaced with cleaner energy, and (3) when coal power capacity is reduced and replaced with the installation of CCUS. Thus, the result shows that in order to fulfill the electricity demand with clean energy for 2030 and 2050, the investment needed are, nearly Rp1,372.96 trillion and Rp2,902.32 trillion respectively. To address the characteristic of energy sector in Indonesia, the SWOT analysis is conducted to mitigate risk and take greatest advantage of chances for success.