Deletes locally downloaded neural network models (.onnx, .pt) and associated auxiliary files from the pliman models directory to free up disk space.
Usage
pliman_remove_model(
model = NULL,
pattern = NULL,
dir = pliman_model_dir(),
force = FALSE,
verbose = TRUE
)
pliman_delete_model(
model = NULL,
pattern = NULL,
dir = pliman_model_dir(),
force = FALSE,
verbose = TRUE
)Arguments
- model
Character vector naming the model(s) or file(s) to remove (e.g.,
"ben2","yolo26n","yolo26n.pt"), or"all"to remove all downloaded models.- pattern
Optional regular expression pattern to match installed model filenames (e.g.,
"^yolo26","seg","\.pt$").- dir
Directory where models are stored (default:
pliman_model_dir()).- force
Logical. If
TRUE, skips confirmation prompt when removing all models. DefaultFALSE.- verbose
Logical. If
TRUE(default), displays informative messages about deleted files.
Examples
if (FALSE) { # interactive()
# Remove a specific model
pliman_remove_model("yolo26n")
# Remove a specific weights file
pliman_remove_model("yolo26n.pt")
# Remove multiple models
pliman_remove_model(c("u2netp", "birefnet-lite"))
# Remove all models matching a pattern
pliman_remove_model(pattern = "^yolo26")
# Remove all installed models
pliman_remove_model("all", force = TRUE)
}
