Kartik
11/05/2025, 5:35 AMMarvin
11/05/2025, 5:35 AMMarvin
11/05/2025, 5:40 AMprefect deployment schedule ls 'flow-name/deployment-name'
- Pause a schedule:
prefect deployment schedule pause 'flow-name/deployment-name' <SCHEDULE_ID>
- Resume a schedule:
prefect deployment schedule resume 'flow-name/deployment-name' <SCHEDULE_ID>
4) Redeploy from your project (reads updated prefect.yaml):
prefect deploy
Or target a specific flow entrypoint/name if you prefer:
prefect deploy ./path/to/file.py:flow_func --name 'flow-name/deployment-name'
5) Clean up old deployments when renaming:
prefect deployment delete 'flow-name/old-deployment-name'
Authoritative references
- Deployment upsert behavior (scheduled runs cleared on update): Create deployment API
- Deployment versioning behavior and what changes get versioned: Deployment versioning
- Schedules concepts and management: Schedules and Create schedules
- prefect.yaml usage: Using prefect.yaml
A couple of clarifying questions so I can tailor the exact steps:
- Are you keeping the same deployment names, or renaming them?
- Do you need to preserve any of the already-created future Scheduled runs?
- Did your prefect.yaml change the work pool name or just parameters/job variables/schedules?Kartik
11/05/2025, 6:00 AMMarvin
11/05/2025, 6:00 AMMarvin
11/05/2025, 6:04 AM--name supports glob-style patterns, but all is not a special keyword.
- prefect deploy -n all will only select deployments literally named all. It won’t match A, B, C unless one of them is named all.
- To upsert all deployments defined in your current project’s prefect.yaml, either:
- Run without a name filter:
prefect deploy
(add --no-prompt if you want it non-interactive), or
- Use a glob that matches everything:
prefect deploy -n '*'
And yes, when the same qualified deployment names are selected (e.g., your existing A, B, C), Prefect will upsert them in place:
- Running flow runs are unaffected.
- Future Scheduled runs for those deployments are cleared and recreated from the updated schedule/config.
Docs for reference:
- Deploying from a project/prefect.yaml: Create deployments
- prefect.yaml usage: prefect.yaml
- Upsert behavior (API): Create deployment APIKartik
11/05/2025, 6:32 AMMarvin
11/05/2025, 6:32 AMMarvin
11/05/2025, 6:32 AMprefect deploy --all will deploy all deployments defined in your current project (from your prefect.yaml). If those deployments already exist (A, B, C), Prefect will upsert them in place.
- prefect deploy -n all is different — it filters by name/pattern. It will only target a deployment literally named all (unless you actually have one). It will not match A, B, C.
Reminder of effects when upserting:
- Running flow runs: unaffected.
- Future Scheduled runs: cleared and recreated from the updated schedules/config.
Examples:
- Upsert all deployments from prefect.yaml:
prefect deploy --all
- Or using a glob to match everything:
prefect deploy -n '*'
Docs:
- Deploying from a project: Create deployments
- Upsert behavior (API): Create deployment API