Skip to content

Removing (completely) TCl/Tk

5 messages · Federico Calboli, Brian Ripley, Rainer M Krug

#
Hi All,

I have TCL/Tk installed from the latest DMG image for R 3.2.2 I will upgrade to R 3.2.3 as soon as the DMG is available).  I?d like to *completely remove* Tcl/Tk as installed by the DMG image.  I can get a list of files from:

pkgutil --files org.r-project.x86_64.tcltk.x11

but the list is long it it looks like it is going to be tedious to remove all the files one by one (I could remove the directories but I could only do that once I am sure nothing else is there from another source).

Is there a smarter way of achieving my goal?

BW

Federico


--
Federico Calboli
Ecological Genetics Research Unit
Department of Biosciences
PO Box 65 (Biocenter 3, Viikinkaari 1)
FIN-00014 University of Helsinki
Finland

federico.calboli at helsinki.fi
#
On 09/12/2015 16:12, Federico Calboli wrote:
You could edit the list to remove directories such as

usr
usr/local
usr/local/bin
usr/local/include
usr/local/lib
usr/local/lib/pkgconfig
usr/local/man
usr/local/man/man1
usr/local/man/man3
usr/local/share
usr/local/share/man
usr/local/share/man/mann

then use a (shell? R?) script on the list.

Also, the R-devel manual sources contains the commented block:

@c Maybe too dangerous for naive users.
@c The second could be uninstalled by an @R{} script like

@c @example
@c lis <- system2("pkgutil", "--files org.r-project.x86_64.texinfo", 
stdout = TRUE)
@c setwd("/")
@c file.remove(rev(lis))
@c @end example

@c @noindent
@c run as the owner of @file{/usr/local}.

where file.remove will remove empty directories (and rev() ensures they 
are emptied first).
#
Indeed.  My only concern is whether these directories have been created by the R DMG installer and have *never* been used by any other program to put some Tcl/Tk related file (or not just those, especially in the ?man? directories!).  Hence my desire to remove the files in the list, so I can ascertain post-hoc whether the directories are empty or not (and thus remove them).

BW

F
--
Federico Calboli
Ecological Genetics Research Unit
Department of Biosciences
PO Box 65 (Biocenter 3, Viikinkaari 1)
FIN-00014 University of Helsinki
Finland

federico.calboli at helsinki.fi
#
On 09/12/2015 16:50, Federico Calboli wrote:
So use unlink() below.

  
    
#
Federico Calboli <federico.calboli at helsinki.fi> writes:
There are tools to do exactly this: uninstall pkgs. One is
I=UninstallPKG [http://www.corecode.at/uninstallpkg/] which I am using -
no affiliation, just a user.

Cheers,

Rainer