git-annex-drop(1)
π git-annex-drop β drop it like it's hot (but safely, bestie)
okay so real talk: this is the git-annex-drop manual page, and it's about removing the content of annexed files from your repository β not the file itself, just the actual bytes. and she's β¨carefulβ¨ about it, which honestly? icon behavior.
πΈ NAME πΈ
git-annex-drop β remove content of annexed files from repository
π SYNOPSIS π
git annex drop [path ...]
β¨ DESCRIPTION β¨
So what does she do? She drops the content of annexed files from this repository, when possible. That "when possible" is doing so much work, and it's the whole point. π«Ά
git-annex will straight up refuse to drop content if it cannot verify it is safe to do so. And what does "safe" mean? Usually it means verifying that the content is stored in some other repository. like, she's not gonna let you delete the last copy and then act surprised, no ma'am.
Also important: content that is required to be stored in the repository will not be dropped, even if enough copies exist elsewhere. see git-annex-required(1) for the deets.
With no parameters, she tries to drop all annexed files in the current directory. You can also pass paths of files or directories to drop, iykyk.
π EXAMPLES π
here's the vibe in action β one wins, one gets told no π:
# git annex drop *.jpeg
drop photo1.jpg (checking origin...) ok
drop photo2.jpg (unsafe)
Could only verify the existence of 0 out of 1 necessary copies
Rather than dropping this file, try using: git annex move
(Use --force to override this check, or adjust numcopies.)
failed
drop photo3.jpg (checking origin...) ok
look at photo2.jpg fighting for its life. she said unsafe, she said rather than dropping this file, try using: git annex move, and honestly? iconic of her to warn you.
π₯ OPTIONS π₯
--from=remoteβ Rather than dropping the content of files in the local repository, this option can specify a remote from which the files' contents should be removed. (so you're dropping over there instead of here, teleportation but make it deletion π )--fastβ When dropping from a remote, avoid doing anything when the remote is not believed to contain a file. Usually each file is attempted to be dropped from the remote. This can be faster, but might leave some files on the remote in some cases. (speed π₯ at the cost of maybe leaving stuff behind β trade-offs, bestie)--autoβ Rather than trying to drop all specified files, drop only those that are not preferred content of the repository, and avoid trying to drop files when there are not enough other copies for the drop to be possible. Seegit-annex-preferred-content(1).
When dropping from a remote, this avoids doing anything when the remote is not belived to contain a file. (yes, belived β that's the spelling in the original, and I'm not gonna gaslight you about it π)
--forceβ Use this option with care! β οΈ It bypasses safety checks, and forcesgit-annexto delete the content of the specified files, even from the last repository that is storing their content. Data loss can result from using this option. like, fr fr, this is the one that can actually ruin your day π
girlypop. please read the --force entry again. that's the whole entire warning. deleting the last copy = the content is GONE. no cap.
--all,-Aβ Rather than specifying a filename or path to drop, this option can be used to drop all available versions of all files.
This is the default behavior when running git annex drop in a bare repository.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings. π
--branch=refβ Drop files in the specified branch or treeish.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings. (same bypass energy, different flag π«)
--unusedβ Drop files found by last run ofgit-annex unused.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings.
--failedβ Drop files that have recently failed to be transferred.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings.
--key=keynameβ Use this option to drop a specified key.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings.
- matching options β The
git-annex-matching-options(1)can be used to specify what to drop. (customize your target list, main character energy π―) --jobs=N,-JNβ Runs multiple drop jobs in parallel. This is particularly useful whengit-annexhas to contact remotes to check if it can drop files. For example:-J4
Setting this to "cpus" will run one job per CPU core. (go off, let the whole machine eat π½οΈ)
--batchβ Enables batch mode, in which lines containing names of files to drop are read from stdin.
As each specified file is processed, the usual output is displayed. If a file's content is not present, or it does not match specified matching options, or it is not an annexed file, a blank line is output in response instead.
--batch-keysβ This is like--batchbut the lines read from stdin are parsed as keys.
Note that this bypasses checking the .gitattributes annex.numcopies setting and required content settings.
-zβ Makes the batch input be delimited by nulls instead of the usual newlines. (weird little separator but she's valid π)--jsonβ Enable JSON output. This is intended to be parsed by programs that usegit-annex. Each line of output is a JSON object. (machine-readable slay π€β¨)--json-error-messagesβ Messages that would normally be output to standard error are included in the JSON instead.
Also the git-annex-common-options(1) can be used. π
π¦ SEE ALSO π¦
π AUTHOR π
Joey Hess <id@joeyh.name> β thank you for the lore, king π«‘
and that's the whole page, bestie! this documentation came to you via the General Commands Manual for git-annex-drop(1), source/version and date exactly as printed on the original footer: git-annex-drop(1), dated at the bottom of the General Commands Manual page. go forth and drop responsibly ππβ¨
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms