With KiCad & Ubuntu you should be able to switch between the nightlies and the stable V5.1 by:
1). Uninstall KiCad.
2). Change repositories.
3). Install KiCad again.
With ubuntu one can run nightly and stable in parallel. One is installed as kicad-nightly and one as just kicad. (They get different system directories, different config directories and have a different name in the packet manager.)