If you are a LPR and find yourself in removal proceedings, you may be eligible for a form of relief called cancellation of removal for lawful permanent residents. It allows you to retain your green card. In order to succeed, however, you must prove that you:
have been a lawful permanent resident of the U.S. for at least five years at the time that the application is filed
continually resided in the U.S.for at least seven years after being admitted in any status and before the “stop-time rule” is triggered
not been convicted of an aggravated felony
have not received cancellation of removal or 212(c) relief in the past, and
as a matter of discretion, deserve to win your case and keep your green card.