Commands

rm

Soft-delete a file to Archive, or permanently delete it from Archive.

poly rm deletes a file or folder. What that actually does depends on where the target already is.

Usage

poly rm <TARGET> [-f|--force]

TARGET accepts a local sync-folder path, a //-prefixed Poly path, a deep link, or a web URL — see How it Works.

  • If the file is not already in Archive, poly rm soft-deletes it: the file moves to //Archive and can be recovered later, either from there or via Recovering Files.
  • If the file is already in Archive, poly rm permanently deletes it. This is irreversible, and Poly asks for confirmation before doing it.

Flags

FlagDescription
-f, --forceSkip the confirmation prompt for a permanent delete. Required if stdin isn't a terminal (e.g. in scripts).

The global --disallow-force flag refuses irreversible actions even if --force is passed — useful when running the CLI inside an agent harness.

Examples

# Soft-delete a file to Archive
poly rm //Home/docs/old-draft.md

# Soft-delete a folder and its contents
poly rm //Home/downloads/temp

# Permanently delete a file that's already in Archive (prompts for confirmation)
poly rm //Archive/old-draft.md

# Permanently delete without a confirmation prompt (e.g. in a script)
poly rm //Archive/old-draft.md --force

# Refuse the delete outright, even with --force
poly rm //Archive/old-draft.md --force --disallow-force
  • mv — move a file instead of deleting it.
  • cp — copy a file before deleting the original.
  • Recovering Files — restore soft-deleted files from Archive.
© Poly Corp. 2026