Headlights and Interior Lights Flickering

I have a 2000 Pontiac Grand Prix and for the past couple days all the lights flicker and then turn off and then come back on. At first it was just the interior lights flickering and then they went to turning off but they don't stay off they do come back on. What is the issue and how do I fix it
0
Answers
start checking grounds. There are ground cables to the metal of the car besides the one to the engine.
Loosen each and clean and retighten.
And I'd consider the battery as well as the alternator.
A second trail would be the ignition switch itself. The contacts in the actual switch, not the key lock cylinder, have worn on some earlier GM H-body cars and people might get poor contacts that would break with vibration during driving. But, IIRC, the headlights don't go through the ignition switch.
If only headlights flicker, then look at the headlight switch. The headlights are protected by a circuit
breaker which will make contact and break when overheated.
2014 Malibu 2LT, 2015 Cruze 2LT,