WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Removing an extension with tce-audit directly  (Read 6762 times)

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Removing an extension with tce-audit directly
« on: July 18, 2011, 02:49:08 PM »
How do you remove an extension and all its unused dependencies from the CLI?

I use a frugal microcore installation exclusively and am having trouble figuring out how to do this.  It seems that AppsAudit (in TC) can do it, like so:
http://wiki.tinycorelinux.net/wiki:remove_apps

...but, even though I know that AppsAudit just uses tce-audit behind the scenes, I can't yet figure out how to do it.

A good example case, and the one I'm actively trying to resolve, is uninstalling 'compiletc' and all its dependencies... unless one of the dependencies is used by another extension.  How do you do this with tce-audit?

In general, I can't find any docs on what the various cmdline options do for tce-audit.  Do they exist somewhere I can't find?  I've tried digging through /usr/bin/tce-audit directly, but shell scripts are torture for me to understand and I can't figure it out (yet).  The best I've found is this small snippet, which helps, but not completely...
http://forum.tinycorelinux.net/index.php?topic=4675.msg24639#msg24639

Any help is much appreciated.


Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Removing an extension with tce-audit directly
« Reply #1 on: July 18, 2011, 03:20:40 PM »
I should probably also note that I do know I can just manually delete the files.  To date I have been manually reading the .dep files and rm'ing my way from the top down.  I'm certain this can be done in a better way with tce-audit, hence my question.

eg: this seems close (arrived at through tinkering)...

Code: [Select]
$ tce-audit builddb /mnt/hda1/tce/optional
Building Tiny Core Extension Database from /mnt/hda1/tce/optional/
..........................................
$ tce-audit delete /mnt/hda1/tce/optional/compiletc | xargs rm
except that it leaves the .dep and .md5.txt files, doesn't seem like the right way to do it anyway, and the tce.db file is left alone.

I tried catching them all by appending a * with this:

Code: [Select]
$ tce-audit delete /mnt/hda1/tce/optional/compiletc | sed 's/$/*/' | xargs rm
But that didn't work for some reason I' don't understand.
« Last Edit: July 18, 2011, 03:42:38 PM by qopit »

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Removing an extension with tce-audit directly
« Reply #2 on: July 18, 2011, 04:02:47 PM »
Got it... the 'delete' alone worked, without any xargs fluff.  I just failed to understand the process (and failed to read the AppsAudit description, apparently)... the files are deleted on reboot.

I'd still like to know if there is any documentation for tce-audit that I just am not able to locate.

My specific example is below (screen captures) for anyone who lands here:



and after the exitcheck.sh shutdown...


Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Removing an extension with tce-audit directly
« Reply #3 on: July 18, 2011, 05:16:32 PM »
It really is that easy;

tce-audit builddb
tce-audit delete compiletc

tce-audit has been described via change logs. Use forum Search function.
Most recently http://forum.tinycorelinux.net/index.php?topic=8586.0
10+ Years Contributing to Linux Open Source Projects.