I'm having some issues with the storage available on my device.
I tried installing samba, and it ran out of storage space while installing dependencies. And now I don't know how to clean up.
What I would like is to remove any package that was pulled in as a dependency that doesn't have any other package that depend on it.
I found this script here:
and this other script here:
But the first one doesn't seem to uninstall anything for me, and the second one only list packages that I (vaguely) recall installing some time ago.
One possible solution would be to just backup the device and reflash openwrt and only install what I need. But I thought there might exist a more graceful way to accomplish this.
this ( or firstboot reset ) is the most graceful... ( unless you have extroot/non-default/non-squash-jffs partitions etc. )
there are currently no valid on-device heuristics without user instantiated metadata to determine user installed packages ( as is the case with example one which does not achieve what you are asking )...
example2 would be generally be ok I think, but it just prints and does not run the remove command... and it truly only finds orphans... ( not ascending recursive orphan-parents )
as the opkg dependancies switch has access to the primary package dependency list... it will achieve a closer outcome...
samba has alot of dependancies... most packages are not so dependency heavy to worry about this... ( well, i suppose the smaller the flash the more you'd need to worry or find a storage/hw solution rather than a package one )