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
Removing (completely) TCl/Tk
5 messages · Federico Calboli, Brian Ripley, Rainer M Krug
On 09/12/2015 16:12, Federico Calboli wrote:
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?
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).
Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford
On 9 Dec 2015, at 18:40, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: On 09/12/2015 16:12, Federico Calboli wrote:
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?
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.
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
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).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
-- 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:
On 9 Dec 2015, at 18:40, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: On 09/12/2015 16:12, Federico Calboli wrote:
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?
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.
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).
So use unlink() below.
BW F
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).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
-- 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
Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford
Federico Calboli <federico.calboli at helsinki.fi> writes:
On 9 Dec 2015, at 18:40, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: On 09/12/2015 16:12, Federico Calboli wrote:
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?
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
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.
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
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).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
-- 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
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer at krugs.de Skype: RMkrug PGP: 0x0F52F982 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 454 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20151209/34d068d6/attachment.bin>