  We study the possibility of using the D-term associated to an anomalous U(1)
for the uplifting of AdS vacua (to dS or Minkowski vacua) in effective
supergravities arising from string theories, particularly in the type IIB
context put forward by Kachru, Kallosh, Linde and Trivedi (KKLT). We find a
gauge invariant formulation of such a scenario (avoiding previous
inconsistencies), where the anomalous D-term cannot be cancelled, thus
triggering the uplifting of the vacua. Then, we examine the general conditions
for this to happen. Finally, we illustrate the results by presenting different
successful examples in the type IIB context.
