Deleting Content safely

rick1958

Active member
A while back, someone posted a CM formula to safely delete unused content, such as content that may have been downloaded for a route no longer installed.
Does anyone know what that setup is? Any reply's should be more then a "guess" or there will be some unhappy people out there... LOL
 
I have a formula I can post when I get home if no one posts it first. It will be a couple of hours...
Thanks...there's certainly no rush. I've just often wondered how much extra baggage I'v been packing. It seems that would be a nice option for the "custom" tab on CM... Installed = True / Has dependents = False / Deletable = True. Sure seems easy enough.
 
Thanks...there's certainly no rush. I've just often wondered how much extra baggage I'v been packing. It seems that would be a nice option for the "custom" tab on CM... Installed = True / Has dependents = False / Deletable = True. Sure seems easy enough.
I agree it would be nice to have a filter like that. I asked for something like that ages ago in the Suggestion Boxcar but the request disappeared without a trace.

My method isn't something that users would like...
 
So, this is not original to me, HPL originally posted it, but I believe it was in response to a similar request I made, and I saved it.
What this does is create a list in CM of assets with have no dependents. Since there are no dependents, they can be safely deleted. What I have often done is sort them by author and export them to CDPs before deleting. Read carefully and note the reference to the "Asset KUID" field at the top of CM (not the column) when you are doing this:

What this is doing: the first six steps are creating a list of assets that ARE dependencies of other assets. The last three steps are basically saying OK, now give me everything that is NOT on that list.

To identify assets that have no dependents:

• Open CM on default "Installed" filter
• Select one random asset
• Hit Ctrl+A
• Right click and select "List Dependencies Recursively"
• Click anywhere in "Asset KUID" field list at top
• Hit Ctrl+A then Ctrl+C
• Close the window
• Create a new custom filter: Installed=True, AND NOT, Asset KUID
• Click "Asset KUID" field
• Hit Ctrl+V



CM now lists all assets that are not a dependency of any other assets.
 
Last edited:
So, this is not original to me, and I did not note down who originally posted it, but I believe it was in response to a similar request I made, and I saved it.
What this does is create a list in CM of assets with have no dependents. Since there are no dependents, they can be safely deleted. What I have often done is sort them by author and export them to CDPs before deleting. Read carefully and note the reference to the "Asset KUID" field at the top of CM (not the column) when you are doing this:

What this is doing: the first six steps are creating a list of assets that ARE dependencies of other assets. The last three steps are basically saying OK, now give me everything that is NOT on that list.

To identify assets that have no dependents:

• Open CM on default "Installed" filter
• Select one random asset
• Hit Ctrl+A
• Right click and select "List Dependencies Recursively"
• Click anywhere in "Asset KUID" field list at top
• Hit Ctrl+A then Ctrl+C
• Close the window
• Create a new custom filter: Installed=True, AND NOT, Asset KUID
• Click "Asset KUID" field
• Hit Ctrl+V



CM now lists all assets that are not a dependency of any other assets.
Thanks a lot! I'll give it a shot and let you know, hopefully not after needing to do a full re-install...LOL <jk>
 
So, this is not original to me, and I did not note down who originally posted it, but I believe it was in response to a similar request I made, and I saved it.
What this does is create a list in CM of assets with have no dependents. Since there are no dependents, they can be safely deleted. What I have often done is sort them by author and export them to CDPs before deleting. Read carefully and note the reference to the "Asset KUID" field at the top of CM (not the column) when you are doing this:

What this is doing: the first six steps are creating a list of assets that ARE dependencies of other assets. The last three steps are basically saying OK, now give me everything that is NOT on that list.

To identify assets that have no dependents:

• Open CM on default "Installed" filter
• Select one random asset
• Hit Ctrl+A
• Right click and select "List Dependencies Recursively"
• Click anywhere in "Asset KUID" field list at top
• Hit Ctrl+A then Ctrl+C
• Close the window
• Create a new custom filter: Installed=True, AND NOT, Asset KUID
• Click "Asset KUID" field
• Hit Ctrl+V



CM now lists all assets that are not a dependency of any other assets.
Perfect!.... Add additional conditions and you can whittle it down as fine as you like. Nice tool to keep in my tool box...Thanks again
 
So, this is not original to me, and I did not note down who originally posted it, but I believe it was in response to a similar request I made, and I saved it.
What this does is create a list in CM of assets with have no dependents. Since there are no dependents, they can be safely deleted. What I have often done is sort them by author and export them to CDPs before deleting. Read carefully and note the reference to the "Asset KUID" field at the top of CM (not the column) when you are doing this:

What this is doing: the first six steps are creating a list of assets that ARE dependencies of other assets. The last three steps are basically saying OK, now give me everything that is NOT on that list.

To identify assets that have no dependents:

• Open CM on default "Installed" filter
• Select one random asset
• Hit Ctrl+A
• Right click and select "List Dependencies Recursively"
• Click anywhere in "Asset KUID" field list at top
• Hit Ctrl+A then Ctrl+C
• Close the window
• Create a new custom filter: Installed=True, AND NOT, Asset KUID
• Click "Asset KUID" field
• Hit Ctrl+V


CM now lists all assets that are not a dependency of any other assets.

Take care ! That process also selects routes ans sessions, even those created by the user ! Logically, they are dependencies of nothing, but obviously not to be deleted, !
 
Thank you once again HPL! This has proved most helpful! I have noted that in my notes and will give full credit from now on!
EDIT: Now noted in my original post.
 
Thank you, HPL and Forester. I copied these steps for future reference. As always, back up the data first before performing operations like this.
 
Thank you, HPL and Forester. I copied these steps for future reference. As always, back up the data first before performing operations like this.
Kind'a on, yet off, topic...What exactly is... "List Dependencies Recursively"? I've always wondered what "Recursively" is.
 
Kind'a on, yet off, topic...What exactly is... "List Dependencies Recursively"? I've always wondered what "Recursively" is.

In my opinion, recursive dependencies gives the dependencies of dependencies.

For example, a locomotive will be displayed in the list of dependencies for a session. The locomotive and its elements will be displayed in the session's recursive dependencies.
 
In my opinion, recursive dependencies gives the dependencies of dependencies.

For example, a locomotive will be displayed in the list of dependencies for a session. The locomotive and its elements will be displayed in the session's recursive dependencies.
ahhhh... that makes sense. So you would collect the bogeys and everything else to complete the locomotive. Thanks could be very useful. I've never used it but can see I will.
 
From The CoPilot AI thingL
In software engineering, recursive dependencies refer to a situation where a package or module depends on another package, which in turn depends on another, and so on, eventually leading back to the original package. This creates a dependency loop that can complicate the installation and management of software packages12.

Now that sounds like N3V with possible errors or mistypes at each step.
So, I'm thinking I could make a route with custom content, load it up with all my rolling stock containing my custom reskins, list it recursively then save as a cdp and the entire route would be saved, much like a train set, without having to download additional content. Sound about right?
 
Back
Top