function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John Manager Training DepJohn Manager Training Dep 

Find the Lightning Pages where Aura component is being used?

Hi Team,

I have certain lightning aura components which I want to delete. I am aware that I need to remove those components from the lightning pages where the aura components are being used.
How do I find those lightning pages?
Many Thanks in advance!
Deepali KulshresthaDeepali Kulshrestha
Hi John,

Greetings to you!
You would first need to retrieve the relevant metadata with a metadata API retrieve call using your tool of choice. Here's a sample package manifest for performing a retrieval of the lightning definitions and related resources:
$ cat package.xml
<?xml version="1.0" encoding="UTF-8"?> 
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
         <members>*</members> 
         <name>AuraDefinitionBundle</name> 
</types> 
        <version>43.0</version> 
</Package>

Then find the files that contain the text string indicating the component in question, in this case, c:myCmp:

$ grep c:myCmp -R .  
./aura/myApp/myApp.app:       <c:myCmp />

Assuming that I haven't commented that section out, this would show that myCmp is being used in myApp.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
John Manager Training DepJohn Manager Training Dep
Thanks for response!
I am trying to find out the Lightning Pages(listed in the Lighning App Builder) using the Lightning Aura Component bundle myCmp(say).
Would your solution list the Lightning Pages as result?