# How to delete the files in ipfs?

**URL:** <https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972>\
**Category:** Help\
**Created:** [May 19, 2018, 1:30am UTC](https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972 "2018-05-19T01:30:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wayne](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@Wayne](https://discuss.ipfs.tech/u/Wayne)\
**Post date:** [May 19, 2018, 1:30am UTC](https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972/1 "2018-05-19T01:30:02Z")

</div>

How to delete the files in ipfs?  
If all the files in ipfs can’t be delete, some indelicate files will exist in ipfs forever?  
If anybody can explain it for me,thanks

---

<div class="post-metadata">

**Author:** ![leerspace](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@leerspace](https://discuss.ipfs.tech/u/leerspace)\
**Post date:** [May 19, 2018, 3:06am UTC](https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972/2 "2018-05-19T03:06:18Z")

</div>

I think the threads linked below answer these questions:

> [@Can I delete my content from the network?](https://discuss.ipfs.tech/t/can-i-delete-my-content-from-the-network/301):
>
> From @whyrusleeping on Tue Apr 07 2015 16:24:43 GMT+0000 (UTC) If you add data to the network, and another node chooses to rehost it, there is no way to cause them to delete it from their blockstore. Copied from original issue: [https://github.com/ipfs/faq/issues/9](https://github.com/ipfs/faq/issues/9)

> [@How can i delete a file from ipfs?](https://discuss.ipfs.tech/t/how-can-i-delete-a-file-from-ipfs/1556):
>
> I add a file to ipfs by command, and how can i delete it? thx!grin

> [@Deleting Content](https://discuss.ipfs.tech/t/deleting-content/202):
>
> I discovered this project this afternoon and I’m thinking through the process. As I read up on it, I see the word “permanent” a lot but as I read into it more it seems that if I’m running an IPFS node, I add something to my node, then I remove my node without anybody requesting my file, wouldn’t that make the file unavailable? Functionally that sounds like a delete process to me. Or even if somebody requests my files, if they GC without pinning my content then it would be gone forever. In short…

> [@Editing/deletion of content and power dynamics](https://discuss.ipfs.tech/t/editing-deletion-of-content-and-power-dynamics/407):
>
> From @aronayne on Tue Aug 09 2016 09:54:39 GMT+0000 (UTC) Reading the available ifps commands : [https://ipfs.io/docs/commands/](https://ipfs.io/docs/commands/) ipfs does not appear to support deletion or editing of existing content that have been added to ifps ? Copied from original issue: [https://github.com/ipfs/faq/issues/156](https://github.com/ipfs/faq/issues/156)

---

<div class="post-metadata">

**Author:** ![postcd](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@postcd](https://discuss.ipfs.tech/u/postcd)\
**Post date:** [December 21, 2022, 5:05pm UTC](https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972/3 "2022-12-21T17:05:15Z")

</div>

I have landed on a phishing page QmcD5fDAHaNdAjrspmnnqsnEy2BgyRBszwDYVFg71Sx6f6. How to remove it from my IPFS node so i do not distribute it even for short time?

---

<div class="post-metadata">

**Author:** ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)\
**Post date:** [January 6, 2023, 8:09pm UTC](https://discuss.ipfs.tech/t/how-to-delete-the-files-in-ipfs/2972/4 "2023-01-06T20:09:03Z")

</div>

`ipfs repo gc` will remove all objects that aren’t pinned (IE: You visited bad content, and want to purge it all).
