1git-annex-drop(1) General Commands Manual git-annex-drop(1)
2
3
4
5#a NAME
6
7 git-annex drop - remove content of files from repository
8
10 git annex drop [path ...]
11
13 Drops the content of annexed files from this repository, when possible.
14
15 git-annex will refuse to drop content if it cannot verify it is safe to
16 do so. Usually this involves verifying that the content is stored in
17 some other repository.
18
19 Content that is required to be stored in the repository will not be
20 dropped even if enough copies exist elsewhere. See git-annex-re‐
21 quired(1).
22
23 With no parameters, tries to drop all annexed files in the current di‐
24 rectory. Paths of files or directories to drop can be specified.
25
27 # git annex drop *.jpeg
28 drop photo1.jpg (checking origin...) ok
29 drop photo2.jpg (unsafe)
30 Could only verify the existence of 0 out of 1 necessary copies
31
32 Rather than dropping this file, try using: git annex move
33
34 (Use --force to override this check, or adjust numcopies.)
35 failed
36 drop photo3.jpg (checking origin...) ok
37
39 --from=remote
40
41 Rather than dropping the content of files in the local reposi‐
42 tory, this option can specify a remote from which the files'
43 contents should be removed.
44
45 --auto Rather than trying to drop all specified files, drop only those
46 that are not preferred content of the repository, and avoid try‐
47 ing to drop files when there are not enough other copies for the
48 drop to be possible. See git-annex-preferred-content(1)
49
50 --force
51 Use this option with care! It bypasses safety checks, and forces
52 git-annex to delete the content of the specified files, even
53 from the last repository that is storing their content. Data
54 loss can result from using this option.
55
56 --all -A
57 Rather than specifying a filename or path to drop, this option
58 can be used to drop all available versions of all files.
59
60 This is the default behavior when running git-annex drop in a
61 bare repository.
62
63 Note that this bypasses checking the .gitattributes annex.num‐
64 copies setting and required content settings.
65
66 --branch=ref
67 Drop files in the specified branch or treeish.
68
69 Note that this bypasses checking the .gitattributes annex.num‐
70 copies setting and required content settings.
71
72 --unused
73 Drop files found by last run of git-annex unused.
74
75 Note that this bypasses checking the .gitattributes annex.num‐
76 copies setting and required content settings.
77
78 --key=keyname
79 Use this option to drop a specified key.
80
81 Note that this bypasses checking the .gitattributes annex.num‐
82 copies setting and required content settings.
83
84 matching options
85 The git-annex-matching-options(1) can be used to specify what to
86 drop.
87
88 --jobs=N -JN
89 Runs multiple drop jobs in parallel. This is particularly useful
90 when git-annex has to contact remotes to check if it can drop
91 files. For example: -J4
92
93 Setting this to "cpus" will run one job per CPU core.
94
95 --batch
96 Enables batch mode, in which lines containing names of files to
97 drop are read from stdin.
98
99 As each specified file is processed, the usual output is dis‐
100 played. If a file's content is not present, or it does not match
101 specified matching options, or it is not an annexed file, a
102 blank line is output in response instead.
103
104 --batch-keys
105 This is like --batch but the lines read from stdin are parsed as
106 keys.
107
108 Note that this bypasses checking the .gitattributes annex.num‐
109 copies setting and required content settings.
110
111 -z Makes the batch input be delimited by nulls instead of the usual
112 newlines.
113
114 --json Enable JSON output. This is intended to be parsed by programs
115 that use git-annex. Each line of output is a JSON object.
116
117 --json-error-messages
118 Messages that would normally be output to standard error are in‐
119 cluded in the json instead.
120
121 Also the git-annex-common-options(1) can be used.
122
124 git-annex(1)
125
126 git-annex-get(1)
127
128 git-annex-move(1)
129
130 git-annex-copy(1)
131
133 Joey Hess <id@joeyh.name>
134
135 git-annex-drop(1)