# How to check is the given \<ipfs\_hash\> is already fully downloaded or not?

**URL:** <https://discuss.ipfs.tech/t/how-to-check-is-the-given-ipfs-hash-is-already-fully-downloaded-or-not/12619>\
**Category:** Uncategorized\
**Created:** [November 10, 2021, 9:36pm UTC](https://discuss.ipfs.tech/t/how-to-check-is-the-given-ipfs-hash-is-already-fully-downloaded-or-not/12619 "2021-11-10T21:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avatar-lavventura](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/avatar-lavventura/32/2890_2.png) [@avatar-lavventura](https://discuss.ipfs.tech/u/avatar-lavventura)\
**Post date:** [November 10, 2021, 9:36pm UTC](https://discuss.ipfs.tech/t/how-to-check-is-the-given-ipfs-hash-is-already-fully-downloaded-or-not/12619/1 "2021-11-10T21:36:35Z")

</div>

First when I run `ipfs --offline block stat <ipfs_hash>` and if the hash does not locally exist I get following message: `Error: blockservice: key not found`.

- Afterwards I run following: `ipfs object stat <ipfs_hash>` and after getting a valid output

- I run `ipfs --offline block stat <ipfs_hash>` again , now it always return valid information (hence does not give an error) even the hash is not downloaded. So assuming if `ipfs --offline block stat <ipfs_hash>` gives and `Error` message is not correlated that the given hash is locally downloaded.

How can I resolve this in order to detect if the asked hashed is fully downloaded or not?

* * *

I can do something like `ipfs refs local | grep <hash>` , but I don’t want to keep fetch all the hashes and it will be slower when there is hundreds of hashes exist.

Related: [How to check is the given ipfs\_hash and its linked hashes already downloaded or not?](https://discuss.ipfs.tech/t/how-to-check-is-the-given-ipfs-hash-and-its-linked-hashes-already-downloaded-or-not/7588)

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 15, 2021, 10:20am UTC](https://discuss.ipfs.tech/t/how-to-check-is-the-given-ipfs-hash-is-already-fully-downloaded-or-not/12619/2 "2021-11-15T10:20:19Z")

</div>

Define fully downloaded… if you mean a full DAG with more than one block, you can do something like `ipfs --offline refs -r <ipfs_hash>` and it should return an error if blocks are missing.

When you ran ` ipfs object stat`, it downloaded that single block (but potentially not other blocks that it links to).
