Disable second, non-existent screen from command line

You can use the following command:

xrandr --auto

If this doesn't disable your non-existent VGA, then use the following method:

  • First run:

    xrandr --current
    

    to get the right name of your VGA. This can be VGA, VGA-0, VGA1, VGA2 and others.

  • If the name of your VGA is, for example VGA2 (as you said), then run:

    xrandr --auto && xrandr --output VGA2 --off
    

    This should disable the output of VGA2.

See man xrandr for more info.

Then, if you get it to work, put the right command in a small script, make it executable and put it to run on start up.