Understanding and manipulating the photoluminescence (PL) of all‐inorganic perovskites is significant in applications toward light‐emitting diodes. Doping has proved to be a very promising approach for tuning the luminescence properties of perovskites. Herein, rare earth (Er and Yb) doped 3D all‐inorganic perovskite flakes (CsPb(Cl/Br)3) are synthesized. At room temperature, they possess a narrow emission peak at 506 nm with 10 nm linewidth and a quite broad peak at 700 nm with 170 nm linewidth, which are from band‐edge PL of α‐CsPb(Cl/Br)3 and self‐trapped excitons of δ‐CsPb(Cl/Br)3, respectively. When exposing the flakes under a light‐soaking, the samples present a color tuning capability spanning from red to green by extension of the soaking time, and the emission properties can recover by removing the light‐soaking and undergoing a certain recovery time. Time‐resolved photoluminescence indicates a photoinduced reduction of defects density in the doped perovskite flakes. Based on further density functional theory calculations, a photoinduced O2‐diffused defect‐passivation mechanism is proposed. The discovery is expected to promote the optical tuning capability of the all‐inorganic perovskites and expand their potential application in optoelectronics devices. [ABSTRACT FROM AUTHOR]