How to Clear Cache in Logseq?

Step 1: Confirm where your data located:

Logseq would ask you to pick a folder on startup:

Finds out the folder (for example, the folder docs here), it typically CONTAINS folders like journals logseq pages INSIDE:


(Using the Logseq document graph as example)

REMEMBER the location of the folder ITSELF (e.g. the folder docs in this example, but not the folders inside!). May do some backup if you like :wink:

If you forget where the folder is, here’s an easy way to find out:

  1. In Logseq, go to a random page with content of the graph
  2. Right click the page title, and select Open in directory:
    image
    Logseq will bring you to the corresponding file of the page inside the graph folder. In the following case, the path to the graph folder is /Users/jun/git/lambda
    image

Step 2: Clear cache

Try Settings > Advanced > Clear cache first

By design, your Logseq would be reset and then you may add your graph back (see Step 3)
Otherwise, you have to clear cache manually:

First, confirm Logseq is closed; then

On a Mac:

  1. Open the “Finder” app.
  2. Go to your home directory (e.g. “Macintosh HD/Users/”).
  3. Find the “.logseq” folder and rename it to “.logseq.backup” by right-clicking on the folder and selecting “Rename”.
  4. Go to the “Application Support” folder under your home directory (e.g. “Macintosh HD/Users//Library/Application Support”).
    About how to access the Application Support folder:
    How can I access my application support f… - Apple Community
  5. Find the “Logseq” folder and rename it to “Logseq.backup” by right-clicking on the folder and selecting “Rename”.

On Windows:

  1. Open the “File Explorer” app.
  2. Go to your home directory (e.g. “C:\Users”).
  3. Find the “.logseq” folder and rename it to “.logseq.backup” by right-clicking on the folder and selecting “Rename”.
  4. Go to the “Roaming” folder under “AppData” in your home directory (e.g. “C:\Users\AppData\Roaming”).
  5. Find the “Logseq” folder and rename it to “Logseq.backup” by right-clicking on the folder and selecting “Rename”.

Then you can try restart Logseq.

Step 3: Add your graph back

Choose back to the folder includes your data, which is the location you kept in the first step :white_check_mark:
(e.g., the folder docs in the example)
image

Related:
Another FAQ topic: How to recover data after "clear cache"

1 Like

What to do if you cleared the cache, but then lost data in your graph when you reopened it?