From: 7stud -- Date: 2008-03-04T09:02:10+09:00 Subject: Re: ruby tk -- how do you get it working? In case anyone else would like to use it, the following is what I used to uninstall all the files installed by the mac one click installer. Look how easy it was! The program produces output while running that identifies each file name as either a dir or a file. If the file name is a dir, it is skipped. If the file name is a file, it is deleted. For files that are deleted, the dir containing the file is examined to determine if it is now empty. If the dir is empty, it is deleted. Here is some sample output: /users/me/2testing/dir2 is a dir ---Skipping to next file name. /users/me/2testing/dir2/aaa.txt is a file ---Deleted file: /users/me/2testing/dir2/aaa.txt examining dir: /users/me/2testing/dir2 ---Dir isn't empty. /users/me/2testing/dir2/test1.txt is a file ---Deleted file: /users/me/2testing/dir2/test1.txt examining dir: /users/me/2testing/dir2 ---Dir isn't empty. /users/me/2testing/dir2/sub_dir is a dir ---Skipping to next file name. /users/me/2testing/dir2/sub_dir/bbb.txt is a file ---Deleted file: /users/me/2testing/dir2/sub_dir/bbb.txt examining dir: /users/me/2testing/dir2/sub_dir ---Dir isn't empty. /users/me/2testing/dir2/sub_dir/test2.txt is a file ---Deleted file: /users/me/2testing/dir2/sub_dir/test2.txt examining dir: /users/me/2testing/dir2/sub_dir ---Deleted dir: /users/me/2testing/dir2/sub_dir examining dir: /users/me/2testing/dir2 ---Deleted dir: /users/me/2testing/dir2 The program also writes every file and directory that it deletes to a file named: deleted_files_Mac_One_Click_Installer.txt so that there is a permanent record of what the program did. The output to the file looks like this: Deleted Directories: /users/me/2testing/dir2/sub_dir /users/me/2testing/dir2 Deleted Files: /users/me/2testing/dir2/aaa.txt /users/me/2testing/dir2/test1.txt /users/me/2testing/dir2/sub_dir/bbb.txt /users/me/2testing/dir2/sub_dir/test2.txt Here is the program (I also wrote some comments after the code): =begin If you go here: /Library/Receipts/ and click on: Ruby One-Click Installer for OSX Tiger.pkg the installer will launch. If you then click on File>Show Files in the Apple menubar, you will see a list of the files installed by the installer. To copy all the file names, click anywhere in the window and hit A and C. You can then paste the file names into a .txt file by hitting P. You can also get that list of files here: /Library/Receipts/Ruby One-Click Installer for OSX Tiger.pkg/Contents/Resources$ with this command: /Library.../Resources$ lsbom -s Ruby\ One-Click\ Installer\ for\ OSX\ Tiger.bom =end def get_master_file_and_path_to_remove puts puts < If you didn't run this program using that command, then exit the program now. Would you like to exit now('y' or 'n'): STR answer = gets.strip if ['y', 'Y', 'yes'].include?(answer) puts puts "Program terminated." exit(1) end puts puts < 5 end end puts #Confirm whether these are the file names that should be deleted: puts <