12 Replies Latest reply on Jul 16, 2008 8:56 AM by zman

    Deleting a distibution package


      I'm having trouble deleting a distribution package (in my case .net 2.0). When i try to delete it from the all distribution packages group, nothing happens.






      I stopped and deleted the policy that was installing it but there are other packages that have this one as dependency. Do i need to stop these policies or will removing the dependency without stopping the policy itself do the trick? Also, is there a way to easily see which packages are dependent on the .net 2.0 one?






      Thanks for your replies




        • 1. Re: Deleting a distibution package

          A package cannot be associated with any task if you want to be able to delete it.

          • 2. Re: Deleting a distibution package


            Is there an easy way to verify this?



            it wold be nice if landesk gave me a message saying (hey, delete this and this package and then you can delete this package...



            • 3. Re: Deleting a distibution package
              phoffmann SupportEmployee

              Well - it's relatively easy stuff to find.


              How comfortable are you with SQL / querying the database.


              While on that subject ... what database system are you using? And what version of LANDesk are we talking about?


              Paul Hoffmann

              LANDesk EMEA Technical Lead

              • 4. Re: Deleting a distibution package


                landesk 8.8 (not sp1 yet) on an oracle database



                and i know some sql but i'm no database expert...



                • 5. Re: Deleting a distibution package
                  phoffmann SupportEmployee

                  That's no big deal - the SQL is actually pretty simple - I'll do most of it for you here.


                  First you need to find the PACKAGE_IDN of your package. (Note - Since you're using Oracle I'm assuming you're logging into Oracle with the user who owns the LANDesk tables. Otherwise, you'd need to add the tableowner before each table -- i.e. "PACKAGE" becomes "LDMSUSER.PACKAGE").


                  You can do this probably easiest by running


                  select * from PACKAGE


                  Here you see the PACKAGE_IDN (most important thing) for each package, as well as the name. if you have a LOT of packages, then look at the Console and write down the EXACT name of the package. You can then search for it by string. I.E. in the case of it being called "MyPackage":


                  select * from PACKAGE where NAME='MyPacakge'


                  the thing you want to scribble down here is the PACKAGE_IDN - which will be numeric. So let's assume it's "1234".


                  All you need to do then is to query a specific table for tasks that have this particular PACKAGE_IDN ("1234" in our example). You would do it like this:


                  select * from LD_TASK where PACKAGE_IDN=1234


                  This gives you the task names that you can chase down in the console.


                  For a more concise view, try this example:




                  This will give you various bits of useful info on WHO owns the task(s) that reference your package in question. Don't know how to resolve a CONSOLEUSER_IDN to something relevant in the real world? That's just one query away. Let's say, you have CONSOLE_IDN users 5, 6 and 8 who each have tasks with your package.


                  You would find out their names out by running the following:


                  select * from CONSOLEUSER where CONSOLEUSER_IDN IN (5, 6, 8)


                  And voila :).


                  It's not that difficult - the LD-database is pretty straight forward.


                  Let me know if you have questions at this point.


                  Paul Hoffmann

                  LANDesk EMEA Technical Lead

                  • 6. Re: Deleting a distibution package

                    i found the package_idn (it was 372 in my case)


                    but when i run select * from ld_task where package_idn=372; it returns no rows. yet i'm still unable to delete...


                    could it be that the dependencies are stopping me from deleting the package? if so, can i query those somehow?

                    • 7. Re: Deleting a distibution package
                      phoffmann SupportEmployee

                      Yes, that's most likely it.


                      Now Oracle isn't exactly very graceful in the error messages it gives in terms of failed constraints.


                      Possibly what's busting you is the CUSTOMGROUPPACKAGE table...


                      Try this (I'll use your IDN)


                      select * from CUSTOMGROUPPACKAGE where MEMBER_IDN=372


                      NOTE - yes, I'm using MEMBER_IDN, not PACKAGE_IDN. It's the same (it's a foreign key) but just renamed. Think of it as a symbolic link, if "foreign key" doesn't mean anything to you :).


                      If you're having problems tracking down the group names, you can try this:


                      select *  from CUSTOMGROUP where CUSTOMGROUP_IDN IN (select CUSTOMGROUP_IDN from CUSTOMGROUPPACKAGE where MEMBER_IDN=372)


                      This will again list you who has this package in their own groups (for identifying users via CONSOLEUSER_IDN see the SQL above).


                      The structure of the CUSTOMGROUP table is pretty simple. Everything with a parent of "NULL" is "in the root", and everything else has got a parent CUSTOMGROUP_IDN, thus forming the tree-structure.


                      I'd suggest using querying the DB to identify where your package lies over deleting it form there - in your case it would be better to use the console I think :). Or - safer at any rate (and saves me some considerable time having to think up failsafe logic) :).


                      Paul Hoffmann

                      LANDesk EMEA Technical Lead

                      • 8. Re: Deleting a distibution package


                        using your query i deleted all the occurences of the package in the tree structure. running the query again now returns no rows



                        yet the package still refuses to go away...



                        • 9. Re: Deleting a distibution package
                          phoffmann SupportEmployee

                          Hrmm - OK - that's beginning to be annoying :).


                          Tell you what - get your DBA to make you an export of your DB, and open up a support case for it. We'll look at the critter on our side and find out where in the DB it's hiding ... can't really think any other reason why it wouldn't delete ... quite peculiar.


                          Paul Hoffmann

                          LANDesk EMEA Technical Lead

                          • 10. Re: Deleting a distibution package


                            my best guess is that .net 2.0 is added as a Dependent Package for some other software.



                            i just don't know whitch one...



                            • 11. Re: Deleting a distibution package
                              phoffmann SupportEmployee

                              Hmm - that's a possibility.


                              Try checking it out with this (see if you get any hits):


                              select * from PACKAGE_RELATIONSHIPS where PACKAGE_IDN=372


                              That should answer that question pretty quickly :).


                              In short - anything that has a RELATIONSHIP_IDN of "0" means "no prerequsites".


                              If you have something like this:























                              In this case, we have:


                              PACKAGE_IDN = 1 -- no dependencies.

                              PACKAGE_IDN = 2 -- no dependencies.


                              PACKAGE_IDN = 3 -- depends on PACKAGE # 1

                              PACKAGE_IDN = 3 -- depends on PACKAGE # 2


                              Note that you're tracking this back via RELATIONSHIP_IDN. The RELATIONSHIP_IDN resolves to "what PACKAGE_RELATIONSHIPS_IDN do I depend on" as it were - it's again a tree-structure, where you start at the lowest branch.


                              Hope this makes sense?


                              Paul Hoffmann

                              LANDesk EMEA Technical Lead

                              • 12. Re: Deleting a distibution package
                                zman Master

                                Interesting thread with some good stuff here. This kind of leads us from the world of troubleshooting issues into maintainance. As more and more functions (dependencies, etc..) are added to software distribution, the product is becoming more complex - and better. However, from a maintenance standpoint there has not been many changes. So say you have a boat load of tasks that have both LDAP and machine based targets, dependent packages and queries, delivery methods, distribution tasks, etc.... Trying to delete a task and clean up all the ancillary stuff can be somewhat time consuming.  Standards and organization helps (Query names that match the distribution/task name and grouping), but it would be great if there was a way to look at a object and see all the dependencies in one place without diving into query manager (e.g., hover, over a distribution package and see what tasks are associated). Yeah you can filter on Distribution Package in the Scheduled Tasks pane but that can be somewhat awkward.  Also, it would be cool if there was an option when deleting Scheduled Tasks to delete all single associations (e.g, queries, distribution tasks, etc... if they are not associated with another object).  Some stuff to help us with spring cleaning.  Just a thought......