Lem/Docs

library remove

Delete one library paper and the local reading files Lem kept for it.

Invocation#

Shell
lem-cli library remove <source> --yes

Inputs and options#

  • Exactly one source, named by any selector that resolves to a library record, and --yes. Without --yes the command names the record, whether it holds a saved analysis, and the files it would delete, and removes nothing.

Output and state#

Removes the record from the manifest, atomically rewrites it, deletes the copied PDF and extracted text the record names when they exist, and prints paper (the record as it was) and deleted_files. The saved analysis goes with the record; adding the source again reads it afresh. Lem Desktop's Library screen has the same action behind a confirmation, through DELETE /library/papers on the loopback backend.

Refusals#

  • A missing or extra source refuses with “library remove needs one arXiv id, DOI, or URL”. Without --yes: “library remove would delete <id> ("<title>")[, its saved analysis][ and <files>]; nothing was removed. Rerun with --yes to remove it”.
  • An unsupported selector, an absent library record, or a manifest or file write failure is printed as a lem-cli refusal and exits nonzero; a second run on the same source refuses as an absent record, so the deletion is never repeated.