Clear dependencies lazarus / 11-Options ---------------------------------------------------------------------- anis2505 · 2016-03-04 09:44 Hi, I can't find answer anywhere else. So on Project inspector I have some packages that are no longuere used in my app but they are still set as dependency. How can I delete them automatically. Thanks in  advance ---------------------------------------------------------------------- balazsszekely · 2016-03-04 09:51 @anis2505 "Delete automatically" you mean by pressing some magic button, all the unused packages will be removed. I don't think there is such a button. You have to delete the packages one by one. ---------------------------------------------------------------------- anis2505 · 2016-03-04 09:55 Why magic. Simply as an idea why not when compiling those non needed packages get removed. Anyway thanks. ---------------------------------------------------------------------- JD · 2016-03-04 10:00 Quote from: anis2505 on March 04, 2016, 10:55:34 amWhy magic. Simply as an idea why not when compiling those non needed packages get removed. Anyway thanks. Just click on/highlight the package & then right click & then select Remove. JD ---------------------------------------------------------------------- balazsszekely · 2016-03-04 10:06 @anis2505 I didn't mean to be rude or anything. I was only trying to say there is no automated mechanism(like a magic button) to remove the unneeded packages(AFAIK). ---------------------------------------------------------------------- marcov · 2016-03-04 10:35 Quote from: anis2505 on March 04, 2016, 10:55:34 amWhy magic. Simply as an idea why not when compiling those non needed packages get removed. Not needed is a not very abstract definition, and is the problem here.  While one could naievely assume that a package is unused when no components are used on forms this is not entirely the case. E.g. a package could register a handler for a certain kind of graphics file. Or somebody could load a stream of data from a random source that contains registered components. A wizard could be made maybe, but it should only present likely candidates for removal to the user. ---------------------------------------------------------------------- JuhaManninen · 2016-03-04 10:54 Quote from: marcov on March 04, 2016, 11:35:14 amA wizard could be made maybe, but it should only present likely candidates for removal to the user. In fact the Package Editor has such a wizard. Right-click the Required Packages node, there is "Clean up dependencies ...". The same thing could be done for project dependencies but it is not implemented yet. The feature is from Mattias. If I understand right it removes dependencies that are already included through another dependency, and also unused dependencies without an initialization section.