# How update a version of file i'm sharing?

**URL:** <https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791>\
**Category:** Uncategorized\
**Created:** [March 21, 2022, 6:12pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791 "2022-03-21T18:12:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chakl22](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chakl22/32/5881_2.png) [@Chakl22](https://discuss.ipfs.tech/u/Chakl22)\
**Post date:** [March 21, 2022, 6:12pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791/1 "2022-03-21T18:12:46Z")

</div>

Let say i’m sharing a file of x version of a program but the program get an update so i just need to import the new version of the program or how i can replace the current one i already sharing, so i don’t have the old and the new one eating space in my .IPFS Storage directory?

I just delete the old one from the IPFS Desktop Menu and it will get deleted from the folder too?

**PD:** I use **IPFS Deskrop**.

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [March 21, 2022, 6:19pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791/2 "2022-03-21T18:19:49Z")

</div>

I don’t know if IPFS Desktop have this functionality.  
But it’s very easy with the cli, you just unpin or remove it from the MFS.  
Then run `ipfs repo gc` (GC stands for Garbage Collection)

---

<div class="post-metadata">

**Author:** ![Chakl22](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chakl22/32/5881_2.png) [@Chakl22](https://discuss.ipfs.tech/u/Chakl22)\
**Post date:** [March 21, 2022, 6:42pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791/3 "2022-03-21T18:42:25Z")

</div>

I guess it have the function of PIN and Unpin.

 ![xxzzzzz](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/e/ec242409826d94c708a1f5e8c3261d442dd907f0.png)

---

<div class="post-metadata">

**Author:** ![Chakl22](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chakl22/32/5881_2.png) [@Chakl22](https://discuss.ipfs.tech/u/Chakl22)\
**Post date:** [March 21, 2022, 6:43pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791/4 "2022-03-21T18:43:54Z")

</div>

So, when i RUN Garbage what files get deleted, all the ones that aren’t PINNED?

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [March 21, 2022, 7:20pm UTC](https://discuss.ipfs.tech/t/how-update-a-version-of-file-im-sharing/13791/5 "2022-03-21T19:20:38Z")

</div>

Yes, garbage collection removes everything that is:

- Not pinned
- Not in the MFS
