These discussions might help if you’re unable to simply replace 4.0.7 as I did.
Library Downloads for KiCad 5.0
The official KiCad libraries are available for download at https://kicad.github.io.
Library data are provided as compressed archives of the individual
libraries within the following categories:
Schematic symbols: https://kicad.github.io/symbols
PCB footprints: https://kicad.github.io/footprints
3D models: https://kicad.github.io/packages3d
How to remap the schematic file so that kicad can properly lay out
a v.4 schematic in v.5. (pcb):