New commands: `pkg add <pkgname>` and `pkg rm <pkgname>`
Could be like so:
pkg add vlc
downloads and installs VLC and all its deps (replaces or alias for get
command)
pkg rm vlc
uninstalls VLC and all its deps.
pkg rm
would need a list of pkg+all_deps
, then to uninstall all pkgs listed that are not needed by packages NOT in the list.
In other words, pkg rm
should only remove the pkg, and then the deps that are not needed by anything else.
So if any of the dependents of a pkg/dep to uninstall ARE NOT listed in the pkg+all_deps
list, the DO NOT uninstall it.
To do this:
At point of uninstall:
Uninstall the pkg, then the deps that have no dependents first. If a dep in the list of pkgs to uninstall is a dependent of another pkg, move it to end of list.
If a dep is depended on by anything NOT in the list of pkgs to uninstall, then just remove of from the list (don't uninstall it).