German chancellor Olaf Scholz has sacked his finance minister, Christian Lindner, pitching the country toward elections.