I agree with @JPBlanc that you cannot remove the dot-sourced script as a whole, but depending on your own coding conventions, you can do this in practice.
First, a few notes about why you cannot do this at all :
(1) PowerShell does not have the concept of a dot-sourced script as a separate object. Once you place it with a point source, its contents will become part of your current context, just as if you manually typed each line in the prompt. Thus, you cannot delete it because it does not actually exist :-)
(2) For the same reason as (1), you cannot list scenarios with an access point.
Now how to do it:
Depending on the contents and conventions of your script access point, you can do what you want. If, for example, the script simply defines three functions - call these func-a , func-b and func-c - then you can either list or delete strong> those functions.
List of Assimilated Functions:
Get-ChildItem function:func-*
Remove Assimilated Functions:
Remove-Item function:func-*
source share