Author Topic: Uninstalling TAR packages  (Read 548 times)

Agent007

  • Member
  • **
  • Posts: 120
  • Kudos: 0
Uninstalling TAR packages
« on: 9 December 2002, 10:53 »
Hi all,

Is there a way to uninstall programs that have been extracted via tar files?

thanks,
007
AMD Athlon processor
256MB SDRAM
Linux Distro - RedHat 9.0

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Uninstalling TAR packages
« Reply #1 on: 9 December 2002, 11:35 »
One file at a time unless the program contained within the tar file has some sort of uninstall or it is source with an "uninstall" section in the Makefile. That's why it is better to use RPM or DEB packages for installing software. They can be easily uninstalled among numerous other advantages.
Someone please remove this account. Thanks...

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
Uninstalling TAR packages
« Reply #2 on: 10 December 2002, 02:55 »
**
use at your own risk.

**
I am serious! use at your own risk!
The method I use works by creating a second UID=0 account (named 'install') whose primary group is 'install'.  After creating this account, change the 'shadow' entry for the password to a single '!'.  This will prevent logins via that account; so you have to 'su' to it after you 'su' to root.
then (as a user, prefereably not ROOT and definately not 'install'), unpack and untar the tarball.  ./configure and make; the su to root su to install.  make install.  move the files wherever you want.  exit user 'install'.  Then execute "find / -xdev -group install | sed -e '/^\/tmp\/.*/d' >_filename_ " to get a list of the files and dump them in "_filename_".  You can then (bash)
Code: [Select]
to set the permissions sensibly and change the owner to root and the group to users.
Later; using the saved file, you can delete them in much the same way:
Code: [Select]

Please note that I have not thouroghly tested it -- so again, use at your own risk.  I have made a script to ease the process.  Before you delete the files, make sure that none of them would be disasterous if missing: ie, "/usr/lib" or something similar (but the Makefile should not be setting the perms of directories like that...).

bash script follows:

[ edit: currently partly broken; the parsing engine acts funny when spaces are in the file/directory name
Code: [Select]

You might want to edit the path specific entities (ie, the initial "cd" and the paths for "find").
The filenames have an appended ".files" and they contain only the full path spec of each file found by "find".

Hope it helps.

-t.

[ December 09, 2002: Message edited by: beltorak0 ]

[ December 10, 2002: Message edited by: beltorak0 ]

from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.


Agent007

  • Member
  • **
  • Posts: 120
  • Kudos: 0
Uninstalling TAR packages
« Reply #3 on: 10 December 2002, 20:54 »
Thanks for ur trouble.....I'm gonna stick to the RPMS packs as Void Main mentioned. The last thing I need is a non functional system.

thanks,
007
AMD Athlon processor
256MB SDRAM
Linux Distro - RedHat 9.0