 ;;;; Interactive helpers
 ;;;;; Package selection
 
-(defun straight--select-package (message &optional for-build)
+(defun straight--select-package (message &optional for-build installed)
   "Use `completing-read' to select a package.
 MESSAGE is displayed as the prompt; it should not end in
 punctuation or whitespace. If FOR-BUILD is non-nil, then only
-packages that have a nil `:no-build' property are considered."
+packages that have a nil `:no-build' property are considered. If
+INSTALLED is non-nil, then only packages that have an available
+repo are considered."
   (completing-read
    (concat message ": ")
    (let ((packages ()))
-     (maphash (lambda (package recipe)
-                (unless (and for-build (plist-get recipe :no-build))
-                  (push package packages)))
-              straight--recipe-cache)
+     (maphash
+      (lambda (package recipe)
+        (unless (or (and for-build (plist-get recipe :no-build))
+                    (and installed
+                         (not (straight--repository-is-available-p recipe))))
+          (push package packages)))
+      straight--recipe-cache)
      packages)
    (lambda (_) t)
    'require-match))

PACKAGE is a string naming a package. Interactively, select
PACKAGE from the known packages in the current Emacs session
using `completing-read'."
  (interactive (list (straight--select-package "Normalize package")))
  (let ((recipe (gethash package straight--recipe-cache)))
    (straight-vc-normalize recipe)))


`straight-rebuild-all'."
  (interactive
   (list
    (straight--select-package "Rebuild package" 'for-build 'installed)
    current-prefix-arg))
  (let ((straight--packages-to-rebuild
         (if recursive
