Microbial related contamination is of major concern and can cause substantial economic losses. Photodynamic inactivation (PDI) has emerged as a suitable approach to inhibit microorganism proliferation. In this work, PDI induced by 6-carboxypterin (Cap), a biocompatible photosensitizer (PS), was analyzed. The growth inhibition of Staphylococcus aureus exposed to artificial UV-A radiation and sunlight in the presence of Cap was investigated. After UV-A irradiation, 50 μM Cap was able to decrease by three orders (with respect to the initial value) the number of S. aureus cells in early biofilms. However, this concentration was 500 times higher than that needed for eradicating planktonic cells. Importantly, under solar exposure, 100 μM Cap was able to suppress sessile bacterial growth. Thus, this strategy is able to exert a bactericidal effect on sessile bacteria and to eradicate planktonic cells by exposing the Cap-containing sample to sunlight.