socket-patch rollback
Put one package, or every package, back on the upstream release
socket-patch rollback puts patched dependencies back on their upstream release and removes the local patch records for them.
- Targets. Pass package names, package URLs, patch UUIDs or paths. With no target it rolls back every patch in the project. In a terminal it asks once first, and
--yesskips the question. A script is never asked. - Hosted patches are rolled back by looking up the upstream registry entry again, so this needs network access. A hosted
bun.lockbcan't be rolled back by the CLI: restore it from version control. - Reinstall afterwards. The installed copy keeps the patched files until the next install.
--preserve-staterestores the dependency but keeps the vendored package or agent record for later reuse.- CVE and GHSA IDs don't select patches here. Use the package URL or the patch UUID.
socket-patch rollback --dry-run # preview
socket-patch rollback minimist # one package
socket-patch rollback pkg:npm/[email protected] # one exact version
socket-patch rollback # everything; asks first in a terminal
socket-patch rollback --yes # everything, no questionsocket-patch rollback -h
-h prints the common options shown here. socket-patch rollback --help prints every option.
$ socket-patch rollback -h
Restore selected patches, or all patches when no target is given
Usage: socket-patch rollback [OPTIONS] [TARGETS]...
Arguments:
[TARGETS]... Package names, PURLs, UUIDs, or paths; omit to restore all patches
Options:
--preserve-state Keep local patch records and artifacts for later reuse [env:
SOCKET_PRESERVE_STATE=]
-h, --help Print help (see more with '--help')
-V, --version Print version
Global options:
--cwd <CWD> Working directory [env: SOCKET_CWD=] [default: .]
-e, --ecosystems <ECOSYSTEMS> Restrict to these ecosystems (comma-separated): npm, pypi, cargo,
gem, golang, maven, composer, nuget, deno [env: SOCKET_ECOSYSTEMS=]
--offline Disable network access; fail if remote data is needed [env:
SOCKET_OFFLINE=]
-j, --json Emit machine-readable JSON output [env: SOCKET_JSON=]
--dry-run Preview the operation without making any mutations [env:
SOCKET_DRY_RUN=]
-y, --yes Skip interactive prompts [env: SOCKET_YES=]Updated about 3 hours ago
Did this page help you?