Quick summary
In California, a motion to vacate a criminal judgment asks a judge to undo a guilty or no contest plea or a conviction. Before sentencing, or within 6 months of a grant of probation, the usual tool is a motion to withdraw the plea under Penal Code 1018. After that, other motions such as PC 1473.7 may apply.
- Deadline: A PC 1018 motion must be filed before judgment or within 6 months after probation is granted with judgment suspended. Courts can’t extend this deadline.
- Grounds: You must show good cause by clear and convincing evidence, such as duress or pressure, a mistake about the plea’s consequences, or a lawyer’s serious errors.
- If it’s granted: Your plea is erased and the case goes back to the start, where you can negotiate again or go to trial.
A motion to vacate a judgment is a request a defendant files in a California criminal case to undo a plea of guilty or nolo contendere (“no contest”). If a judge finds good cause, the plea is withdrawn and a not guilty plea is entered, so the case starts over in the criminal process. While the case is still pending, this is done under Penal Code 1018 PC, and it is commonly called a motion to withdraw a plea or to set aside a plea.1
Penal Code 1018 states: “On application of the defendant at any time before judgment or within six months after an order granting probation is made if entry of judgment is suspended, the court may, and in case of a defendant who appeared without counsel at the time of the plea the court shall, for a good cause shown, permit the plea of guilty to be withdrawn and a plea of not guilty substituted.”2
In plain terms, you must act quickly, and you need a solid reason the judge can see in the record or your evidence.
Defendants can show good cause by demonstrating that they were:
- the subject of duress, fraud, or coercion when they entered their plea,
- not aware of important consequences of their plea,
- not represented by an attorney at the time of their plea and didn’t knowingly give up that right, or
- the victim of ineffective assistance of counsel.
If a judge grants the motion, the plea is erased and the case begins again at the arraignment stage. If you plead not guilty and no new deal is made, the case goes to a trial.
If the judge denies the motion, you may be able to appeal the case, or later get the conviction dismissed (“expunged”) under Penal Code 1203.4.
Our California criminal defense attorneys will discuss the following in this article:
- 1. What is a Motion to Vacate a Judgment?
- 2. When will a judge grant the motion?
- 3. What are the remedies if a judge grants the motion?
- 4. What happens if a defendant loses a Motion to Withdraw a Plea?

1. What is a Motion to Vacate a Judgment?
A motion to withdraw a plea, or motion to vacate judgment, is a request filed with the trial court in a California criminal case. You file it to withdraw a plea of guilty or no contest and replace it with a not guilty plea.3
Deadline for a PC 1018 motion
Under Penal Code 1018, you can file the motion only:
- before judgment (that is, before you are sentenced), or
- within six months after the court grants probation, if entry of judgment is suspended.
California courts treat this time limit as mandatory. In one case, an appeals court held that a trial judge had no power to let a defendant withdraw a plea entered almost nine years earlier.4
Other motions after the deadline or after a trial
A PC 1018 motion is for undoing a plea. It is not the way to challenge a guilty verdict after a court or jury trial. Depending on your situation, other options include:
- a motion for a new trial (PC 1181), filed after a guilty verdict and before sentencing,
- a motion to vacate a conviction under Penal Code 1473.7, which a person no longer in criminal custody can file because of a misunderstanding of immigration consequences, newly discovered evidence of innocence, or racial bias under the California Racial Justice Act,5
- a writ of habeas corpus (a petition arguing that you are unlawfully held in custody), and
- a writ of coram nobis in limited cases.
How the motion is filed
To bring a motion to withdraw a plea, you or your attorney file the motion (usually with a notice of motion and a memorandum of points and authorities) with the court clerk. The court then sets a hearing where the prosecutor and defense counsel argue the motion before the judge.
2. When will a judge grant the motion?
A California judge will grant a motion to withdraw a plea only on a showing of good cause, and you must prove good cause by clear and convincing evidence. The decision is up to the judge’s discretion.6
Defendants can show good cause by proving that they were:
- the subject of duress, fraud, or coercion,
- not aware of important consequences of their plea,
- not represented by an attorney at the time of their plea, or
- represented by a lawyer who made serious errors.
2.1. Duress, fraud, or coercion
A plea may be withdrawn for mistake, ignorance, inadvertence, or any other factor that overcame your free and clear judgment, including duress or fraud.7
Good cause may exist if, for example:
- a judge improperly pressured you to “take a deal,”8
- a co-defendant threatened to harm you or a family member if you didn’t take responsibility for the offense, or
- an officer threatened to retaliate against your loved ones if you didn’t plead guilty.
Ordinary pressure, such as reluctance or worry about family, usually isn’t enough. In one case, a court held that family pressure was not duress where the defendant had a lawyer and got exactly what he bargained for.9
Example: Luis refuses a “package deal” that requires all four co-defendants to plead. The judge tells him he is letting the others down and should take the offer. After a short recess he pleads guilty. Because the judge’s comments pushed him into the plea, Luis may be able to withdraw it.
2.2. Defendant not aware of the consequences of a plea
You may be able to withdraw a guilty or no contest plea by showing that you were not aware of a serious consequence of the plea and would not have pleaded had you known.
Examples include when:
- you weren’t told that the plea made you ineligible for probation, so prison was mandatory,10
- you didn’t know the plea would lead to a professional license suspension or revocation, or
- you didn’t realize the plea could lead to immigration consequences, such as removal or deportation.11
2.3. No attorney
If you entered a guilty or no contest plea without a lawyer, Penal Code 1018 says the judge “shall” allow you to withdraw it for good cause.12 A plea without a lawyer must be entered knowingly, freely, and intelligently, after the court explains your right to counsel.
For example, a motion could be granted if you pleaded without a lawyer and the judge accepted the plea without explaining your rights or its consequences. It is more likely to be denied if the judge fully explained everything first.
2.4. Ineffective assistance of counsel
You may be able to withdraw a plea if your lawyer’s poor performance led you to plead. To prove ineffective assistance of counsel, you must show that your lawyer’s representation fell below an objective standard of reasonableness, and that it changed the outcome (for a plea, that you would not have pleaded guilty otherwise).13
This could be shown, for example, if your lawyer:
- did not advise you about serious consequences of the plea,
- did not properly investigate the case, or
- pushed you to take a plea that was not in your interest.
If you want to withdraw a plea because of your own lawyer’s conduct, you can ask the judge for a Marsden hearing to explain the problem.

3. What are the remedies if a judge grants the motion?
If a California judge grants a motion to withdraw a plea, the criminal case basically starts over.
The plea is withdrawn and a not guilty plea is entered. If no new deal is made, the case goes to a jury trial.
If the plea was part of a plea deal, the deal is undone too. That means the prosecutor can reinstate any charges dismissed as part of the deal.
4. What happens if a defendant loses a Motion to Withdraw a Plea?
If the judge denies the motion, the plea stands and the case moves to sentencing. You may then be able to appeal or, later, seek a dismissal of the conviction. For more detail, see our page on motions to withdraw a plea in California.
4.1. Appeals process
You can appeal the denial after judgment. Because the appeal follows a guilty or no contest plea, you must first get a certificate of probable cause from the trial court.14 If the judge abused their discretion in denying the motion, the Court of Appeal may reverse and allow you to withdraw the plea.15
4.2. Expungement process
If you are convicted, you may later be able to get the conviction dismissed under Penal Code 1203.4, usually after completing probation or your sentence.
A dismissal releases you from most “penalties and disabilities” of the conviction, but it does not erase it. The conviction still exists for some purposes, such as a later criminal case, some licenses, and gun rights.16
For additional help…

For guidance or to discuss your case with a criminal defense lawyer, contact our law firm at the Shouse Law Group. We offer free consultations.
We represent clients throughout California, including in Los Angeles, Los Angeles County, and San Diego.
Legal references:
- California Penal Code 1018 PC.
- Penal Code 1018 PC (as of November 2026; last amended 1991).
- Penal Code 1018 PC (see note 2 above).
- People v. Superior Court (Rodas) (2017) 10 Cal.App.5th 1316 (the six-month limit in PC 1018 is mandatory; a trial court exceeded its jurisdiction by allowing withdrawal of a nearly nine-year-old plea).
- Penal Code 1473.7 PC, subd. (a)(1)-(3) (as amended effective January 1, 2026).
- People v. Huricks (1995) 32 Cal.App.4th 1201 (“the burden of proof necessary to establish good cause in a motion to withdraw a guilty plea is by clear and convincing evidence”).
- People v. Burkett (1953) 118 Cal.App.2d 204: a plea “may be withdrawn for mistake, ignorance, inadvertence or for any other factor overreaching a defendant’s free and clear judgment.”
- People v. Sandoval (2006) 140 Cal.App.4th 111 (judge’s comments pressuring a defendant to accept a package deal); People v. Weaver (2004) 118 Cal.App.4th 131 (trial court’s over-involvement in plea negotiations).
- People v. Huricks (see note 6 above).
- People v. Caban (1983) 148 Cal.App.3d 706 (defendant not told that admitting a gun-use allegation made him ineligible for probation).
- People v. Superior Court (Giron) (1974) 11 Cal.3d 793 (trial court could allow withdrawal of a plea entered without knowing it could lead to deportation).
- Penal Code 1018 PC (see note 2 above).
- Strickland v. Washington (1984) 466 U.S. 668, 687-688.
- Penal Code 1237.5 PC.
- People v. Weaver (see note 8 above) (reversing denial of a motion to withdraw a plea as an abuse of discretion).
- Penal Code 1203.4 PC, subd. (a).