Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Reloading packages: Removed[symbol]

  • To: mathgroup at
  • Subject: [mg57791] Reloading packages: Removed[symbol]
  • From: Josef Karthauser <joe at>
  • Date: Wed, 8 Jun 2005 03:21:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I want to reload a package that's already been loaded.  (Because it's
been modified in another mathematica session and I want to take
advantage of the new functionality.)

I thought I was being clever by first removing all the package symbols
with Remove[] and then removing the package name from $Packages.  This
allows me to reload the package, but I'm left with a dilemma.
Definitions that are in memory that referenced the symbols that have
been removed have been replaced with 'Removed["symbol"]' and I can't
seem to match them to turn them back.

Is there a way of reloading a module?  How do I fix this problem?

The string of operations to reload MyPackage was:


    $Packages = Select[$Packages, =AC StringMatchQ[#, "MyPackage`*"] &];


My problem now is effectively:

    In: a = MyPackage`Foo[]
    In: Remove["MyPackage`*"]
    In: a // FullForm
    Out: Removed["Foo"][]

How do I convert a back?

    In: a /. Removed[x_] :> Symbol[x]

Doesn't do anything :(.

Josef Karthauser (joe at
FreeBSD (cvs meister, admin and hacker)
Physics Particle Theory (student)
================ An eclectic mix of fact and theory. =================

  • Prev by Date: Re: Centering of graphics
  • Next by Date: Re: NIntegrate
  • Previous by thread: Re: Centering of graphics
  • Next by thread: Re: Reloading packages: Removed[symbol]