We present the influence of vacuum annealing on RF magnetron-sputtered TiO2−x thin films grown at various oxygen partial pressures (pO2) of 2.0%, 4.0% and 6.0% to enhance the ultra-violet (UV) photodetector performance. Apart from the film deposited at 2.0% of pO2, all the as-grown TiO2−x films show an amorphous nature, whereas thermally annealed TiO2−x films at 400 °C show the rutile phase. As revealed by the linear current–voltage characteristics, the ohmic-contact behavior was observed between the TiO2−x layer and the electrode material. Benefiting from the above features, the photocurrent was significantly increased at 4.0% of pO2 due to the increase of oxygen vacancies and the suppression of electron–hole recombination. As a result, thermally annealed TiO2−x films are very useful for next-generation UV-photodetectors even at a lower power density of 1.72 mW/cm2. Therefore, the merits of the above findings present a promising strategy to enhance the UV photoresponse of thermally annealed TiO2−x films by optimizing the pO2 at 4.0%. © 2019, Springer Science+Business Media, LLC, part of Springer Nature.