Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • uninstall ado/hlp from Stata Journal?

    Dear All,

    Suppose that I'd like to uninstall ado/hlp files installed from, say, package st0026 from http://www.stata-journal.com/software/sj2-4? Any suggestion?
    Ho-Chuan (River) Huang
    Stata 17.0, MP(4)

  • #2
    I believe you can do that with:

    Code:
    ado uninstall st0026

    Comment


    • #3
      Dear Clyde, Thanks for your reply. However, an error message occured as
      Code:
      . ado uninstall st0026
      package not found
      r(111);
      Ho-Chuan (River) Huang
      Stata 17.0, MP(4)

      Comment


      • #4
        Well, one possibility is that you don't actually have it installed. The other is that it is not installed in PLUS but somewhere else. (PLUS is the file on the -adopath- that is the default location for installing and unstalling.)

        So the first thing I would do is try to locate the package. One of the files in st0026 is attk.ado. So try
        Code:
        findfile attk.ado
        local path `r(fn)'
        local path: subinstr local path "/attk.ado" ""
        ado uninstall st0026, from(`path')
        The above code searches the -adopath- for the file, and assuming it finds it, it extracts the path from the full pathname/filename, and then tells -ado uninstall- to do the installation there.

        If it still says it can't find the package, then it may be that it was installed outside the -adopath-, perhaps in the working directory of some project that used those files. If you can't recall where that is, you probably will have to rely on your operating system's file searching facilities to locate them. When you find the path run -ado uninstall- with the -path()- option specified for that path.

        Comment


        • #5
          Dear Clyde, Thanks again. It still didn't work,
          Code:
          . findfile attk.ado
          c:\ado\plus/a/attk.ado
          
          . local path `r(fn)'
          
          . local path: subinstr local path "/attk.ado" ""
          
          . ado uninstall st0026, from(`path')
          package not found
          r(111);
          PS: All the files have been installed in "c:\ado\plus\a".

          Ho-Chuan (River) Huang
          Stata 17.0, MP(4)

          Comment


          • #6
            So did you try -ado uninstall st0026, from("c:/ado/plus/a")-?

            And if that doesn't work, you can just go to that directory in Windows Explorer and delete the .ado and .sthlp files that are part of that package. That package is pretty simple: it has no auxiliary files, so deleting the .ado and .sthlp files is all that's needed.
            Last edited by Clyde Schechter; 14 Jan 2018, 23:15.

            Comment


            • #7
              Dear Clyde, Thanks again. I guess the best way is to delete the files manually.
              Ho-Chuan (River) Huang
              Stata 17.0, MP(4)

              Comment


              • #8
                Does st0026 show up when you run
                Code:
                ado dir
                If not, then it likely was not installed by normal means and is missing from Stata's directory of installed packages, which I think is what controls the uninstall process.

                Also,
                Code:
                ado, find(st0026)
                might be informative. Are you certain you have st0026 installed? Perhaps you have st0026_2 installed?

                Comment


                • #9
                  Originally posted by River Huang View Post
                  Dear Clyde, Thanks again. I guess the best way is to delete the files manually.
                  I don't recommend doing that. Stata keeps track of the ado files you have installed in a separate file and just deleting the ado files will not update that. That is if, as William Lisowski asks it was installed by normal means. If you just copied the files to the plus directory in the first place, then for sure you can just delete them.
                  Alfonso Sanchez-Penalver

                  Comment


                  • #10
                    Dear William, Many thanks. You are right. Indeed, the package st0026_2 (rather than st0026) was installed (I don't know why?). And, Clyde's first suggestion
                    Code:
                    ado uninstall st0026_2
                    works.
                    Ho-Chuan (River) Huang
                    Stata 17.0, MP(4)

                    Comment


                    • #11
                      Hi, Alfonso, Thanks for your suggestion.
                      Ho-Chuan (River) Huang
                      Stata 17.0, MP(4)

                      Comment


                      • #12
                        Dear Clyde, My bad. As indicated in #8, William doubt that I have st0026_2 installed, and he is right. Following your suggestion,
                        Code:
                        ado uninstall st0026_2
                        works fine.

                        Ho-Chuan (River) Huang
                        Stata 17.0, MP(4)

                        Comment


                        • #13
                          I tried to uninstall ado/hlp. But failed. Please help.

                          Comment


                          • #14
                            Please inform the package you wish to uninstall, what you typed and what was the error message.
                            Best regards,

                            Marcos

                            Comment


                            • #15
                              I have stata 16 (stata/IC)

                              Comment

                              Working...
                              X