is there a terminal command or a app to delete all orphaned packages (dependencies)/tks
orphaned packages
Moderators: 666philb, Forum moderators
- rockedge
- Site Admin
- Posts: 7163
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 3242 times
- Been thanked: 3047 times
- Contact:
Re: orphaned packages
Using the Pkg package manager there is a command
In a terminal look at pkg help
the command would be pkg clean
or when installing using Pkg : pkg add somepackage autoclean
- mikeslr
- Posts: 3146
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 187 times
- Been thanked: 1018 times
Re: orphaned packages
How did you install the app(s)? If you used Puppy Package Manager and/or downloaded and clicked a package, Puppy Package Manager (front-end to petget) keeps a record of each separate (i.e. dependencies required by application chosen to install) package. See below. So, Puppy Package Manager> Uninstall [at top near left edge] can be used.
Pkg-Cli keeps its own records (I think in /var) so you can use the its command to remove the installed package: # uninstall a pkg
apt-get remove <pkg-name>
AFAIK, the only times you will always have difficulty installing packages are (a) you decompressed a package and manually installed its files, hence no package manager has a record; or (b) you used pkg-cli and don't know if a dependency is being used by more than one application. I think it's command:
pkg what-needs <pkg-name>
may answer that question; but likely only if pkg-cli installed it.
There may be a better way when PPM installed a package and dependencies. What I'd have had to do* before uninstalling an application which installed dependencies was to examine PPM>Uninstall and see what packages were installed at the same time; or better still, open its listing in /root/.package --note the ./dot signifying a hidden file/folder-- in a text editor. Each such file lists the entire contents of a package and the location to which each included file was written. But, when you uninstall a package its listing in .packages is deleted. What you might have to do is re-install the application to re-acquire that file.
P.S. I see rockedge has posted. He uses pkg-cli far more often than I. So, when possible follow his advice.
-=-=-=-
I rarely install packages having many dependencies (unless python is among those dependencies). What I do is use PPM to download files into a named folder; then use PaDS to generate an SFS. Hence, the packages don't have to be uninstalled as they never were installed. Lately, the only multi-lib packages I've installed are Qt or Qt5, which are used by many applications and don't conflict with other Qt/Qt5 files. I never think about uninstalling them. Lacking priority, python modules in an SFS may not be used; hence have to be installed. So I use the above mentioned routine if a python-dependent application was installed.