<Page>

                                                                    Exhibit 4.2


                          REGISTRATION RIGHTS AGREEMENT


     REGISTRATION RIGHTS AGREEMENT, dated as of May 22, 2000 by and between TRC
COMPANIES, INC., a Delaware corporation ("TRC") and John V. Lowney, individually
and as Trustee of the John V. Lowney 1990 Revocable Trust dated August 27, 1990,
Ron L. Helm, Ronald A. Massone, Stason I. Foster, C. Barry Butler, Thomas C.
Benson, Jr., Belinda P. Blackie, Thomas F. McCloskey and Peter M. Langtry (each
such individual a "Stockholder" and collectively, the "Stockholders").

     TRC and the Stockholders have entered into a Stock Purchase Agreement (the
"Agreement") dated May 22, 2000, pursuant to which, among other things, the
Stockholders will be entitled to receive, subject to the terms and conditions of
the Agreement shares of the common stock, $.10 par value, of TRC, (the "TRC
Shares") as well as Common Stock Purchase Warrants (the "Warrants") to purchase
TRC shares.

     In connection with the foregoing, TRC hereby grants to the Stockholders
certain registration and other rights with respect to the TRC Shares.

     Accordingly, the parties hereto agree as follows:

     1. REGISTRATION. (a) If TRC acts to register any of its common stock under
the Securities Act of 1933 (the "Act") (including for this purpose a
registration effected by TRC for stockholders other than the Stockholders) on or
before (i) one year after the Closing Date, or (ii) with respect to TRC Shares
purchased upon exercise of the Warrants, one year after a majority of the
Warrants are exercised, and the registration form to be used may be used without
substantial modification for the registration of the TRC Shares, TRC will give
prompt written notice to John V. Lowney as agent for the Stockholders (the
"Agent"), and will include in such registration statement all or any portion of
the TRC Shares which the Stockholders elect to sell in such registration,
provided that TRC shall not be obliged to, and shall not, include any TRC Shares
in more than one effective registration statement during the periods noted as
(i) and (ii) above. Furthermore, TRC shall not be obligated to and shall not
include any TRC Shares unless (a) the holders of at least 25,000 of the TRC
Shares subject to registration shall have requested registration, and (b) TRC's
underwriter shall determine that the inclusion of such TRC Shares would not
adversely affect TRC's offering. If TRC's underwriter determines that such TRC
Shares would adversely affect TRC's offering, the Sellers (as defined below)
will reduce the number of TRC Shares they propose to sell (pro rata) as
requested by TRC's underwriter, provided if the reduction is of twenty (20) or
more percent of the TRC Shares requested for registration, then the Stockholders
shall be entitled to participate in one additional registration in accordance
with this Agreement, provided that under no circumstances will such right
continue beyond one year after the Closing Date or with respect to TRC Shares
purchased upon exercise of the Warrants one year after the majority of the
Warrants are exercised.

     Any request for inclusion in a proposed registration shall be made within
thirty (30) days of receipt by the Agent of written notice from TRC.

                                       1
<Page>


          (b) Each holder of TRC Shares who wishes to have his TRC Shares
registered (a "Seller") will furnish TRC with such appropriate information
relating to the holder as TRC reasonably requests in writing. Following the
effective date of the registration statement, TRC will, upon the request of a
Seller, promptly supply such number of prospectuses meeting the requirements of
the Act as may be reasonably requested by the Seller to permit Seller to make a
public offering of all TRC Shares of the Seller included in the registration
statement. TRC will use its best efforts to qualify the TRC Shares for sale in
such states as the Seller may reasonably designate; provided that in no event
will TRC be required to file a general consent to service of process.

               In the event of any underwritten public offering, TRC shall enter
into and perform its obligations under an underwriting agreement, in usual and
customary form, with the managing underwriter of such offering. TRC shall notify
each Seller at any time when a prospectus relating to the sale of such Seller's
securities is required to be delivered under the Act of the happening of any
event as a result of which such prospectus includes an untrue statement of a
material fact or omits to state a material fact required to be stated therein or
necessary to make the statements therein not misleading in the light of the
circumstances then existing. TRC shall cause all TRC Shares registered pursuant
to this Agreement to be listed on each securities exchange on which similar
securities issued by TRC are then listed. TRC shall provide a transfer agent and
registrar for all TRC Shares registered pursuant to this Agreement and CUSIP
number for all such TRC Shares, in each case not later than the effective date
of such registration.

          (c) TRC will indemnify and hold harmless each Seller and each
underwriter, within the meaning of the Act, who may purchase from or sell for a
Seller TRC Shares, from and against any and all losses, claims, damages and
liabilities caused by any untrue statement or alleged untrue statement of a
material fact contained in any registration statement under the Act or any
prospectus included in it required to be filed or furnished by reason of this
Agreement or caused by any omission or alleged omission to state a material fact
required to be stated therein or necessary to make the statements therein not
misleading, except insofar as such losses, claims, damages or liabilities are
caused by an untrue statement or alleged untrue statement or omission or alleged
omission based upon information furnished or required to be furnished in writing
to TRC by the Seller or underwriter expressly for use in the registration
statement, which indemnifications will include each person, if any, who controls
any such Seller or underwriter within the meaning of the Act; PROVIDED, HOWEVER,
that TRC will not indemnify any Seller or underwriter or controlling person with
regard to a requested registration statement unless the Seller or underwriter
agrees to indemnify TRC, its directors, each officer signing the registration
statement and each person, if any, who controls TRC within the meaning of the
Act from and against any and all losses, claims, damages, and liabilities caused
by any untrue statement or alleged untrue statement of a material fact contained
in any registration statement or any prospectus required to be filed or
furnished by reason of this Agreement or caused by any omission or alleged
omission to state therein a material fact required to be stated therein or
necessary to make the statements therein not misleading insofar as such losses,
claims, damages or liabilities are caused by any untrue statement or alleged
untrue statement or omission or alleged omission based upon information
furnished in writing to TRC by the Seller or underwriter expressly for use
therein.


                                       2
<Page>


          (d) All costs and expenses incident to the registration and
qualifications required by this Section shall be borne by TRC, except that
underwriting discounts attributable to the TRC Shares, any legal fees of counsel
for the Sellers, and the cost of qualifying the TRC Shares for sale in any
states other than the states in which the common stock to be registered by TRC
is to be qualified shall be borne by the Sellers.

          (e) TRC shall not be required to effect any registration of TRC Shares
if it shall deliver to the Stockholders requesting such registration an opinion
of counsel (which opinion and counsel shall be reasonably satisfactory to such
Stockholders) to the effect that the TRC Shares held by such Stockholders may be
sold in the public market without registration under the Securities Act and any
applicable state securities laws.

     2. RULE 144. TRC shall take all actions necessary to enable holders of TRC
Shares to sell such securities without registration under the Securities Act
within the exemptions provided by (a) Rule 144, or (b) any similar rule or
regulation hereafter adopted by the Securities and Exchange Commission
including, without limiting the generality of the foregoing, filing on a timely
basis all reports required to be filed by the Exchange Act. Upon the request of
the Stockholders, TRC will deliver to such holders a written statement as to
whether it has complied with such requirements.

     3. ASSIGNMENT OF REGISTRATION RIGHTS. The rights to cause TRC to include
the TRC Shares in a registration statement pursuant to this Agreement may be
assigned (but only with all related obligations) by a Stockholder to a
transferee or assignee of such securities that (i) is a Stockholder's family
member, trust for the benefit of a Stockholder, or a trust or foundation formed
by the Stockholder, or (ii) after such assignment or transfer, holds at least
25,000 TRC Shares (subject to appropriate adjustment for stock splits, stock
dividends, combinations and other recapitalizations), provided: (a) TRC is,
within a reasonable time after such transfer, furnished with written notice of
the name and address of such transferee or assignee and the securities with
respect to which such registration rights are being assigned; (b) such
transferee or assignee agrees in writing to be bound by and subject to the terms
and conditions of this Agreement; and (c) such assignment shall be effective
only if immediately following such transfer the further disposition of such
securities by the transferee or assignee is restricted under the Act.

     4. AMENDMENT AND MODIFICATION. This Agreement may be amended, modified or
supplemented only by written agreement of the party or parties against whom
enforcement of such amendment, modification or supplement is sought.

     5. NOTICES. Any notice or other communication required or permitted
hereunder shall be in writing and shall be delivered personally, by reputable
courier, sent by facsimile transmission or sent by certified, registered or
express mail, postage prepaid. Any such notice shall be deemed given when so
delivered, personally, or sent by facsimile transmission or, if mailed or sent
by courier, two days after the date of deposit in the United States mails or
delivery to the courier as follows:

                                       3

<Page>


                  TO THE STOCKHOLDERS:

                  See attached Schedule 5.


                  TO TRC:

                  TRC Companies, Inc.
                  5 Waterside Crossing
                  Windsor, CT 06095
                  Attention:  Vice President and General Counsel
                  Fax No. 860-298-6291

or to such other address as any party shall furnish to the other by notice given
in accordance with this Section.

        Any party may, by notice given in accordance with this Section to the
other parties designate another address or person for receipt of notices
hereunder.

     6. BINDING EFFECT; ASSIGNMENT. This Agreement shall be binding upon and
inure to the benefit of and be enforceable by the parties hereto and their
respective successors, legal representatives and permitted assigns subject to
paragraph 3. Subject to paragraph 3 hereof, neither this Agreement, nor any
right hereunder, may be assigned by any party hereto without the written consent
of the other parties hereto.

     7. GOVERNING LAW. This Agreement and the rights and obligations of the
parties hereto shall be governed by, and construed and enforced in accordance
with, the laws of the State of Connecticut, without giving effect to the
conflicts of law principles thereof. The parties hereto irrevocably and
unconditionally consent to submit to the exclusive jurisdiction of the courts of
the State of Connecticut and of the United States of America located in the
State of Connecticut (the "Connecticut Courts") for any litigation arising out
of or relating to this Agreement and the transactions contemplated hereby (and
agree not to commence any litigation relating thereto except in such courts),
waive any objection to the laying of venue of any such litigation in the
Connecticut Courts and agree not to plead or claim in any Connecticut Court that
such litigation brought therein has been brought in an inconvenient forum.

     8. HEADINGS; EXECUTION IN COUNTERPARTS. The article, section and paragraph
headings and captions contained herein are for convenience only and shall not
control or affect the meaning or construction of any provision hereof. This
Agreement may be executed by the parties hereto in separate counterparts, each
of which shall be deemed to be an original, and which together shall constitute
one and the same instrument. Each counterpart may consist of a number of copies
hereof, each signed by less than all but together signed by all of the parties
hereto.

     9. INVALIDITY OF PROVISION. The invalidity or unenforceability of any
provision of this Agreement in any jurisdiction shall not affect the validity or
enforceability of the remainder of

                                       4
<Page>

this Agreement in that jurisdiction or the validity or enforceability of this
Agreement, including that provision, in any other jurisdiction. If any
restriction or provision of this Agreement is held unreasonable, unlawful or
unenforceable in any respect, such restriction or provision shall be
interpreted, revised or applied in a manner that renders it lawful and
enforceable to the fullest extent possible under law.

     10. FURTHER ASSURANCES. Each party hereto shall do and perform or cause to
be done and performed all further acts and things and shall execute and deliver
all other agreements, certificates, instruments, and documents as any other
party hereto reasonably may request in order to carry out the intent and
accomplish the purposes of this Agreement and the consummation of the
transactions contemplated hereby.

     11. NO THIRD-PARTY BENEFICIARIES. Nothing in this Agreement is intended or
shall be construed to give any Person other than the parties hereto any legal or
equitable right, remedy or claim under or in respect of this Agreement or any
provision contained herein.

     12. ENTIRE AGREEMENT. This Agreement and the Stock Purchase Agreement
constitute the entire agreement among the parties with respect to the
transactions contemplated hereby and thereby, and supersede all prior agreements
and understandings, written or oral, with respect thereto.

     IN WITNESS WHEREOF, the parties have executed this Agreement as of the date
first above written.

                                          TRC COMPANIES, INC.

                                          By:
                                               -------------------------------
                                          Name:  Martin H. Dodd
                                          Title:  Vice President


                                       5
<Page>



                                    STOCKHOLDERS:



                                    ------------------------------------------
                                    John V. Lowney, Individually and as
                                    Trustee for the John V. Lowney 1990
                                    Revocable Trust dated August 28. 1990


                                    ------------------------------------------
                                    Ron L. Helm


                                    ------------------------------------------
                                    Ronald A. Massone


                                    ------------------------------------------
                                    Stason I. Foster


                                    ------------------------------------------
                                    C. Barry Butler


                                    ------------------------------------------
                                    Thomas C. Benson, Jr.


                                    ------------------------------------------
                                    Belinda P. Blackie


                                    ------------------------------------------
                                    Thomas F. McCloskey


                                    ------------------------------------------
                                    Peter M. Langtry



                                       6
<Page>


                                   SCHEDULE 5


STOCKHOLDERS:

John V. Lowney, Individually and as
Trustee for the John V. Lowney 1990
Revocable Trust dated August 28. 1990

Ron L. Helm

Ronald A. Massone

Stason I. Foster

C. Barry Butler

Thomas C. Benson, Jr.

Belinda P. Blackie

Thomas F. McCloskey

Peter M. Langtry


                                       7