-f, --force (Force): Skip confirmation prompts and proceed even when the action would normally be blocked or warned about. --force tells a command to go ahead even when it would normally stop and warn you. rm -f deletes without asking. git push --force overwrites the remote branch with your local version. docker rm -f stops and removes a running container.
Frequently asked questions about -f, --force (Force)
How is -f, --force (Force) used in practice?
The warning exists because the action is often destructive. A forced push can throw away commits a colleague pushed an hour ago. That is why git push --force-with-lease exists: it only overwrites the remote if it still looks the way you last saw it.
What should you keep in mind with -f, --force (Force)?
Force is sometimes the right tool. Cleaning up a broken local environment is a fair use. But if a script needs --force to run every time, something in the setup is wrong. Find out what the command was warning about before you silence it for good.
Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.
Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — `docker rm`,
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.