Context : Elemental abundance studies of solar twin stars suggest that the solar chemical composition contains signatures of the formation of terrestrial planets in the solar system , namely small but significant depletions of the refractory elements . Aims : To test whether these chemical signatures of planets are real , we study stars which , compared to solar twins , have less massive convective envelopes ( therefore increasing the amplitude of the predicted effect ) or are , arguably , more likely to host planets ( thus increasing the frequency of signature detections ) . Methods : We measure relative atmospheric parameters and elemental abundances of two groups of stars : a “ warm ” late-F type dwarf sample ( 52 stars ) , and a sample of “ metal-rich ” solar analogs ( 59 stars ) . The strict differential approach that we adopt allows us to determine with high precision ( \mathrm { errors } \sim 0.01 dex ) the degree of refractory element depletion in our stars independently of Galactic chemical evolution . By examining relative abundance ratio versus condensation temperature plots we are able to identify stars with “ pristine ” composition in each sample and to determine the degree of refractory-element depletion for the rest of our stars . We calculate what mixture of Earth-like and meteorite-like material corresponds to these depletions . Results : We detect refractory-element depletions with amplitudes up to about 0.15 dex . The distribution of depletion amplitudes for stars known to host gas giant planets is not different from that of the rest of stars . The maximum amplitude of depletion increases with effective temperature from 5650 K to 5950 K , while it appears to be constant for warmer stars ( up to 6300 K ) . The depletions observed in solar twin stars have a maximum amplitude that is very similar to that seen here for both of our samples . Conclusions : Gas giant planet formation alone can not explain the observed distributions of refractory-element depletions , leaving the formation of rocky material as a more likely explanation of our observations . More rocky material is necessary to explain the data of solar twins than metal-rich stars , and less for warm stars . However , the sizes of the stars ’ convective envelopes at the time of planet formation could be regulating these amplitudes . Our results could be explained if disk lifetimes were shorter in more massive stars , as independent observations indeed seem to suggest . Nevertheless , to reach stronger conclusions we will need a detailed knowledge of extrasolar planetary systems down to at least one Earth mass around a significant number of stars .