Forrest logo
back to the ipfs tool

ipfs:tldr:5c8c0

ipfs: Remove unpinned files from local storage.
$ ipfs repo gc
try on your machine

The command ipfs repo gc is used in the IPFS (InterPlanetary File System) to perform garbage collection on the IPFS repository.

IPFS is a distributed file system that allows you to store and share files across a network of connected nodes. When you add files to IPFS, they are stored in the repository on your local machine. However, as you add and remove files, the repository may become fragmented, and unused data may accumulate.

The ipfs repo gc command helps to optimize the space utilization and performance of your IPFS repository. It identifies the unused or orphaned data blocks and removes them, freeing up disk space. This command also repacks the repository, making it more efficient for storage and retrieval of files.

By running ipfs repo gc periodically, you can ensure that your IPFS repository remains clean and optimized, improving the overall usability of the IPFS network.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ipfs tool