# Does "ipfs add" duplicate content?

**URL:** <https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56>\
**Category:** Help\
**Created:** [January 13, 2017, 8:02pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56 "2017-01-13T20:02:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mukka](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mukka](https://discuss.ipfs.tech/u/mukka)\
**Post date:** [January 13, 2017, 8:02pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/1 "2017-01-13T20:02:30Z")

</div>

Whenever I add a new file to IPFS, are files duplicated? In other words, if I want to share a 1GB file, would I have to host 2GB of data (my original file + a copy for IPFS)?

---

<div class="post-metadata">

**Author:** ![Mateon1](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@Mateon1](https://discuss.ipfs.tech/u/Mateon1)\
**Post date:** [January 14, 2017, 11:20am UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/2 "2017-01-14T11:20:57Z")

</div>

Currently, yes, all files added to IPFS are also added to the IPFS blockstore.  
This is currently being worked on, to allow file referenced blocks in the blockstore, in order to avoid duplicating data.

This is the PR that aims to implement this:

> <https://github.com/ipfs/go-ipfs/pull/2634>

I’m not 100% sure what the progress on that is, but it’s a massive change, so it will definitely take a while to complete.

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [January 15, 2017, 12:21pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/3 "2017-01-15T12:21:36Z")

</div>

The Filestore feature (aka “add without duplicating”) will be getting some extra attention this week during the [300 TB Challenge Sprint](https://github.com/ipfs/archives/issues/87)

This feature is especially important for people who have large amounts of data. For example if the Internet Archive wanted to put a petabyte of data on IPFS right now they would have to spin up an extra petabyte of storage. That’s a major blocker. We’re working hard to un-block it, but we have to be careful to do it right.

---

<div class="post-metadata">

**Author:** ![mukka](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mukka](https://discuss.ipfs.tech/u/mukka)\
**Post date:** [January 15, 2017, 12:27pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/4 "2017-01-15T12:27:28Z")

</div>

> if the Internet Archive wanted to put a petabyte of data on IPFS

is this just an hypothetical dream, or have they expressed any serious interest in using IPFS once this feature is available?

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [January 15, 2017, 3:47pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/5 "2017-01-15T15:47:28Z")

</div>

> [@mukka](#):
>
> is this just an hypothetical dream, or have they expressed any serious interest in using IPFS once this feature is available?

I’m speaking hypothetically, but Brewster Kahle and the IA have been some of the most vocal advocates of the decentralized web, pointing out the systemic benefits of these technologies as well as the ways in which tools like ipfs will allow IA to fulfill their mission in a more robust way. I get the impression that they’re waiting for someone to finish “drawing the rest of the owl” so they can use it. The two remaining things preventing us from saying “Hey IA, take it for a spin” are 1) finishing the filestore implementation and 2) load testing the system. Both of those will get attention this quarter.

---

<div class="post-metadata">

**Author:** ![lidel](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/lidel/32/9853_2.png) [@lidel](https://discuss.ipfs.tech/u/lidel)\
**Post date:** [March 24, 2017, 6:26pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/6 "2017-03-24T18:26:39Z")

</div>

This seems to be possible now:

> <https://github.com/ipfs/kubo/issues/875#issuecomment-286018472:>
>
> it would be very useful to have files that are passed through \`ipfs add\` \_not\_ c…opied into the \`datastore\`. for example here, i added a 3.2GB file, which meant the disk usage for that file now doubled!
> 
> Basically, it would be nice if the space usage for adding files would be O(1) instead of O(n) where n is the file sizes...

> The filestore code has been merged, and will be shipped in 0.4.7

> For some notes and usage instructions, see this comment: [#3397 (comment)](https://github.com/ipfs/go-ipfs/issues/3397#issuecomment-284337564):

> > **How to enable**

> > Modify your ipfs config:

> > > `ipfs config --json Experimental.FilestoreEnabled true`

> > And then pass the `--nocopy` flag when running `ipfs add`

---

<div class="post-metadata">

**Author:** ![vasmas](https://avatars.discourse-cdn.com/v4/letter/v/bb73d2/32.png) [@vasmas](https://discuss.ipfs.tech/u/vasmas)\
**Post date:** [May 13, 2017, 9:00pm UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/7 "2017-05-13T21:00:28Z")

</div>

> [@Mateon1](#):
>
> Currently, yes, all files added to IPFS are also added to the IPFS blockstore.

where is it? the blockstore

I use Win 10. I add files from the folder C:\Users\Admin\site  
After adding, I delete it. So the folder 'site" is empty, but files are still available in ipfs.  
If I **unpin** those files, where are they? Are they deleted? or should I manually delete those somewhere?

---

<div class="post-metadata">

**Author:** ![Mateon1](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@Mateon1](https://discuss.ipfs.tech/u/Mateon1)\
**Post date:** [May 14, 2017, 9:57am UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/8 "2017-05-14T09:57:44Z")

</div>

By default, the blockstore is located within `C:\Users\<Your username>\.ipfs`, but you can change this location with the `IPFS_PATH` environment variable.  
If you unpin files you added, they remain in the block store until the next garbage collection is ran, either manually with `ipfs repo gc`, or automatically if you started your daemon with `ipfs daemon --enable-gc`.

---

<div class="post-metadata">

**Author:** ![Katamori](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/katamori/32/75_2.png) [@Katamori](https://discuss.ipfs.tech/u/Katamori)\
**Post date:** [May 18, 2017, 1:43am UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/9 "2017-05-18T01:43:55Z")

</div>

Am I able to apply `--nocopy` or a similar feature **after** running `ipfs add`?

---

<div class="post-metadata">

**Author:** ![neoteo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/neoteo/32/2615_2.png) [@neoteo](https://discuss.ipfs.tech/u/neoteo)\
**Post date:** [May 19, 2017, 7:59am UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/10 "2017-05-19T07:59:26Z")

</div>

> [@lidel](#):
>
> ipfs config --json Experimental.FilestoreEnabled true

Adding a file I knew existed in the block store using the --nocopy flag increased the size of the block store by a small amount instead of reducing it by the size of the file I added, so it seems not.

---

<div class="post-metadata">

**Author:** ![lidel](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/lidel/32/9853_2.png) [@lidel](https://discuss.ipfs.tech/u/lidel)\
**Post date:** [May 19, 2017, 11:37am UTC](https://discuss.ipfs.tech/t/does-ipfs-add-duplicate-content/56/11 "2017-05-19T11:37:03Z")

</div>

My guess is that you need to (unpin &) remove old version from block store (via forced-GC) before adding it again with `--nocopy`.
