error-handlingpackagecommon-lispsbclquicklisp

How to remove a package from defpackage?


I defined a package like this:

(defpackage :web-app
  (:nicknames :wa)
  (:use :cl :hunchentoot))

This works fine.

But I want to remove hunchentoot. When I remove it and recompile I get the following error:

Unknown location:
  warning: 
    WEB-APP also uses the following packages:
      (HUNCHENTOOT)
    See also:
      Common Lisp Hyperspec, DEFPACKAGE [:macro]
      SBCL Manual, *ON-PACKAGE-VARIANCE* [:variable]

How do I remove packages from my lisp image in these cases.

I have tried restarting the image but no luck.


Solution

  • In this case the function to use is unuse-package. For example:

    (unuse-package :hunchentoot :web-app)
    

    That will sync the package system with your defpackage form so it will re-evaluate without a warning.