help update dialog: update
-------------------------------------------------------------------------------
Title
[R] update -- Update Stata
Syntax
Report on update level of currently installed Stata
update
Set update source
update from location
Compare update level of currently installed Stata with that of source
update query [, from(location)]
Update ado-files from source if necessary
update ado [, from(location) into(dirname)]
Update executable from source if necessary
update executable [, from(location) into(dirname) force]
Update utilities from source if necessary
update utilities [, from(location) into(dirname) force]
Perform update ado, update executable, and update utilities if necessary
update all [, from(location)]
Complete installation of newly updated executable
update swap [, clear]
Set automatic updates (Mac and Windows only)
set update_query {on|off}
set update_interval #
set update_prompt {on|off}
Menu
Help > Official Updates
Description
The update command reports on the current update level and installs
official updates to Stata. Official updates are updates to Stata as it
was originally shipped from StataCorp, not the additions to Stata
published in, for instance, the Stata Journal (SJ) or Stata Technical
Bulletin (STB). Those additions are installed using the net command and
updated using the adoupdate command; see [R] net and [R] adoupdate.
update without arguments reports on the update level of the currently
installed Stata.
update from sets an update source, where location is a directory name or
URL. If you are on the Internet, type update from
http://www.stata.com.
update query compares the update level of the currently installed Stata
with that available from the update source and displays a report.
update ado compares the update level of the official ado-files of the
currently installed Stata with those available from the update
source. If the currently installed ado-files need updating, update
ado copies and installs those files from the update source that are
necessary to bring the ado-files up to date. update ado is seldom
used by itself. Instead, it is called automatically by update all.
update executable compares the update level of the currently installed
Stata executable with that available from the update source. If the
currently installed Stata needs updating, update executable copies
the new executable from the update source, but the last step of the
installation -- erasing the old executable and renaming the new
executable -- must be performed by the update swap command. update
executable displays instructions on how to do this. update
executable is seldom used by itself; it is called automatically by
update all.
update utilities compares the update level of the currently installed
Stata utilities, including Stata's PDF documentation, with that
available from the update source. If the currently installed Stata
utilities need updating, update utilities copies and installs the new
utilities from the update source. update utilities is seldom used by
itself; it is called automatically by update all.
update all does the same as update ado followed by update executable and
update utilities. This is what you should type to check for and
install updates.
update swap completes the installation of a newly updated executable by
automatically swapping the newly downloaded executable with the
currently running executable. During this process, Stata will shut
down to perform the swap before automatically launching the new
executable. This command is necessary after either the update
executable or the update all command when a new executable is
downloaded.
set update_query determines if update query is to be automatically
performed when Stata is launched. Only Mac and Windows platforms can
be set for automatic updating.
set update_interval # sets the number of days to elapse before performing
the next automatic update query. The default # is 7. The interval
starts from the last time an update query was performed
(automatically or manually). Only Mac and Windows platforms can be
set for automatic updating.
set update_prompt determines whether a dialog is to be displayed before
performing an automatic update query. The dialog allows you to
perform an update query now, perform one the next time Stata is
launched, perform one after the next interval has passed, or disable
automatic update query. Only Mac and Windows platforms can be set
for automatic updating.
Options
from(location) specifies the location of the update source. You can
specify the from() option on the individual update commands or use
the update from command. Which you do makes no difference. You
typically do not need to use this option.
into(dirname) specifies the name of the directory into which the updates
are to be copied. dirname can be a directory name or a sysdir
codeword such as UPDATES or STATA; see [P] sysdir. This option is
seldom used.
For update ado, the default is into(UPDATES), the official update
directory. Network computer managers might want to specify into() if
they want to download the updates but leave the last step -- copying
the files into the official directory -- to do themselves.
For update executable, the default is into(STATA), the official Stata
directory. Network computer managers might want to specify into() so
that they can copy the update into a more accessible directory. Then
the last step of copying the new executable over the existing
executable would be left for them to perform.
For update utilities, the default is into(STATA/utilities). That is,
the default is the directory utilities within the official Stata
directory. We recommend you not use into() to change where Stata
wants to update its utilities; if you do so, certain parts of Stata
such as the online PDF documentation and future updates may not work
properly.
force is used with update executable or update utilities to force
downloading a new executable or utilities even if, based on the date
comparison, Stata does not think it is necessary. There is seldom a
reason to specify this option. There is no such option for update
ado because, if you wanted to force the reinstallation of all
ado-file updates, you would need to erase only the UPDATES directory.
You can type sysdir to see where the UPDATES directory is on your
computer; see [P] sysdir.
clear specifies that it is okay for update swap to shut down this Stata
and start the new one, even if data in memory have not been saved to
disk.
Examples
. update (report on what you have installed)
. update query (compare what you have with update source)
. update all (update ado-files and executable)
. update swap (install the new executable)
Saved results
update without a subcommand, update from, and update query save the
following in r():
Scalars
r(inst_exe) date of executable installed (*)
r(avbl_exe) date of executable available over web (*) (**)
r(inst_ado) date of ado-files installed (*)
r(avbl_ado) date of ado-files available over web (*) (**)
r(inst_utilities) date of utilities installed (*)
r(avbl_utilities) date of utilities available over web (*) (**)
Macros
r(dir_exe) directory in which executable is stored
r(dir_ado) directory in which ado-files are stored
r(dir_utilities) directory in which utilities are stored
r(name_exe) name of the Stata executable
Notes:
* Dates are stored as integers counting the number of days since January
1, 1960; see [D] dates and times.
** These dates are not saved by update without a subcommand because
update by itself reports information solely about the local computer
and does not check what is available on the web.
Also see
Manual: [R] update;
[GSM] 19 Updating and extending Stata---Internet functionality,
[GSU] 19 Updating and extending Stata---Internet functionality,
[GSW] 19 Updating and extending Stata---Internet functionality
Help: [R] adoupdate, [R] net, [R] ssc, [P] sysdir