I recently ran into some problems with duplicate entries in my stata.trk file. This file is located at the base of an ado tree (like PLUS) and is used to track what user written programs have been installed. To see if you have duplicate entries you can use -ado dir pkgname-. If an entry appears twice you can not remove the pacakge normally.
. ado uninstall pkgname
criterion matches more than one package
r(111);
You can get these duplicate entries if you install packages using:
If they are from different sources then you will manually have to remove the earlier ones from stata.trk file (there may also be orphaned files to want to deal with). I've run into this when developing a package and I want to switch from using the 'stable' package (e.g. on SSC) to the 'development' package (e.g. local files or GitHub). The moral of the story seems to be if you are going to install a package from a new source make sure that you uninstall it first.
Anyone found easier ways of dealing with things like this?
. ado uninstall pkgname
criterion matches more than one package
r(111);
You can get these duplicate entries if you install packages using:
- -ssc install pkgname, replace- and the package has been updated since you installed. FYI, you should use -adoupdate pkgname, update-
- -net install pkgname, force-
If they are from different sources then you will manually have to remove the earlier ones from stata.trk file (there may also be orphaned files to want to deal with). I've run into this when developing a package and I want to switch from using the 'stable' package (e.g. on SSC) to the 'development' package (e.g. local files or GitHub). The moral of the story seems to be if you are going to install a package from a new source make sure that you uninstall it first.
Anyone found easier ways of dealing with things like this?
Comment