       (print straight-use-symlinks (current-buffer)))
     (unless (and straight--build-cache-text
                  (string= (buffer-string) straight--build-cache-text))
-      (write-region nil nil (straight--build-cache-file) nil 0))))
+      (write-region nil nil (straight--build-cache-file) nil 0))
+    (when (memq straight-check-for-modifications '(live live-with-find))
+      ;; We've imported data from `straight--modified-dir' into the
+      ;; build cache when loading it. Now that we've written the build
+      ;; cache back to disk, there's no more need for that data (and
+      ;; indeed, it would produce spurious package rebuilds on
+      ;; subsequent inits).
+      (delete-directory (straight--modified-dir) 'recursive))))
 
 ;;;;; Live modification checking
 

          ;; * GNU find >=4.4.2
          (mtime (straight--format-timestamp)))
      (straight--insert 0 package mtime straight--build-cache))
    (straight--insert 2 package recipe straight--build-cache)
    (setq straight--live-modified-repos
          (delete local-repo straight--live-modified-repos))
    (unless (string-match-p "/" local-repo)
      (condition-case _
          (delete-file (straight--modified-file local-repo))
        (file-error)))))

;;;;; Main entry point


generated at the end of an init from the keys of
`straight--profile-cache'.")

;; See http://stormlightarchive.wikia.com/wiki/Calendar for the
;; schema.
(defvar straight--build-cache-version :shash
