The indoor localization method based on the Received Signal Strength (RSS) fingerprint is widely used for its high positioning accuracy and low cost. However, the propagation behavior of radio signals in an indoor environment is complicated and always leads to the existence of outliers and noises that deviate from a normal RSS value in the database. The fingerprint database containing outliers and noises will severely degrade the performance of an indoor localization system. In this paper, an approach to reconstruct the fingerprint database is proposed with the purpose of mitigating the influences of outliers. More specifically, by exploiting the spatial and temporal correlations of RSS data, the database can be transformed into a low-rank matrix. Therefore, the RPCA (Robust Principle Component Analysis) technique can be applied to recover the low-rank matrix from a noisy matrix. In addition, we propose an improved RPCA model which takes advantage of the prior knowledge of a singular value and could remove outliers and structured noise simultaneously. The experimental results show that the proposed method can eliminate outliers and structured noise efficiently.