forum/Can I purge .git/annex/transfer directory ?git-annexhttp://git-annex.branchable.com/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/git-annexikiwiki2017-10-02T17:55:45Zcomment 1http://git-annex.branchable.com/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_1_3510190e7c5d08f906b24e5743245f87/supernaught2017-07-18T17:03:54Z2017-07-18T17:03:54Z
<p>I'm not certain, but I think</p>
<pre><code>$> git annex unused --fast
$> git annex drop --unused
</code></pre>
<p>will work.</p>
How about find .git/annex/transfer .git/annex/bad -type f -print0 | xargs -0 rm -fvhttp://git-annex.branchable.com/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_2_bfd829aed28817a5aada3f237496c865/stephane-gourichon-lpad2017-07-19T19:42:25Z2017-07-19T19:42:25Z
<blockquote><p>I'm not certain, but I think</p>
<p>$> git annex unused --fast
$> git annex drop --unused</p>
<p>will work.</p></blockquote>
<p>This (quickly) finds only two entries: one regarding a file in <code>.git/annex/transfer</code> and one other in <code>.git/annex/bad/</code>.</p>
<p>Anyway, <code>git annex drop --unused</code> is too general and would potentially involve a number of other files.</p>
<p>I'm just considering something that should probably be safe:</p>
<pre><code>find .git/annex/transfer .git/annex/bad -type f -print0 | xargs -0 rm -fv
</code></pre>
<p>unless people tell me it's dangerous somehow. Having to do a <code>git annex fsck</code> in the future is okay. Having important features broken until I do a <code>git annex fsck</code> (or worse) is less cool. <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":-)" /></p>
comment 3http://git-annex.branchable.com/forum/Can_I_purge_.git__47__annex__47__transfer_directory___63__/comment_3_cf2ae4db1fdb421b59d85edd9e58b868/joey2017-10-02T17:55:45Z2017-10-02T16:55:59Z
<p>It's fine to delete .git/annex/transfer/ at any time.</p>
<p>Those files are used to make <code>git annex info</code> (and the webapp) be able to
show what transfers are in progress. Normally they're cleaned up when a
transfer finishes; if you interrupt git-annex they will be left behind.</p>
<p>Running <code>git annex info</code> is also supposed to clean up the stale transfer
info files, but it was broken -- now fixed.</p>
<p>The only time you get files in .git/annex/bad/ is when fsck finds a file
got corrupted somehow and moves its content there. It's fine to delete
those unless you were planning to recover or examine the corrupted file in
some way.</p>