Vinn
Vinn

Reputation: 1181

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.

Upvotes: 1

Views: 105

Answers (1)

Xach
Xach

Reputation: 11854

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.

Upvotes: 4

Related Questions