<PAGE>
                                                                     Exhibit 4.2


                      SEVENTH AMENDMENT TO RIGHTS AGREEMENT

         SEVENTH AMENDMENT TO RIGHTS AGREEMENT, dated as of April 30, 2004
("Amendment"), to the rights agreement, dated as of September 2, 1999, as
amended on July 27, 2001, January 25, 2002, March 27, 2003, May 6, 2003, July 8,
2003 and September 17, 2003 (the "Rights Agreement"), between Capital
Environmental Resource Inc. (the "Company") and American Stock Transfer & Trust
Company (the "Rights Agent"). Any capitalized terms not otherwise defined herein
shall have the meaning ascribed to such term in the Rights Agreement.

         WHEREAS, the Board of Directors of the Company believes it to be in the
best interest of the Company and its shareholders to enter into a Common Share
Subscription Agreement (the "Sixth Subscription Agreement"), by and among the
Company and the investors named therein and dated April 30, 2004, which
agreement provides for, among other things, the subscriptions by such investors
for the Company's Common Shares (the "Shares"), and warrants (together with the
Warrants (as defined in the Third Amendment to Rights Agreement), the
"Warrants") to purchase Company Common Shares (the "Common Shares").

         WHEREAS, as a result of the foregoing, the Company desires that the
transactions contemplated by the Sixth Subscription Agreement, and the investors
listed therein be exempt from the provisions of the Rights Agreement;

         WHEREAS, the Company and the Rights Agent have heretofore executed and
entered into the Rights Agreement;

         WHEREAS, pursuant to Section 27 of the Rights Agreement, the Company
may supplement or amend any provision of the Rights Agreement in accordance with
the provisions of Section 27 thereof;

         NOW, THEREFORE, in consideration of the premises and the mutual
agreements set forth herein, the parties hereby agree as follows:

         Section 1.  AMENDMENTS TO SECTION 1 OF THE RIGHTS AGREEMENT.

         (a) The definition of "Acquiring Person" in Section 1 of the Rights
Agreement is hereby amended by deleting the last sentence thereof and adding the
following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, no
Investor, Permitted Assignee, or Substitute Investor (as such terms are defined
in the Subscription Agreement dated July 27, 2001 by and among the Company and
the persons listed in Schedule A thereto (the "Subscription Agreement"), the
Subscription Agreement dated February 5, 2002 by and among the Company and the
persons listed in Schedule A thereto (the "Second Subscription Agreement"), the
Series 1 Preferred Subscription Agreement, dated March 27, 2003 by and among the
Company and the persons listed in


<PAGE>

Schedule A thereto (the "Third Subscription Agreement")), the Series 1 Preferred
Subscription Agreement, dated July 8, 2003 by and among the Company and the
persons listed in Schedule A thereto (the "Fourth Subscription Agreement"), the
Series 1 Preferred Subscription Agreement, dated September 17, 2003 by and among
the Company and the persons listed in Schedule A thereto (the "Fifth
Subscription Agreement") or the Common Share Subscription Agreement, dated April
30, 2004 by and among the Company and the Investors listed on Annex A thereto
(the "Sixth Subscription Agreement") nor any of their Affiliates or Associates,
shall become an Acquiring Person, either individually or collectively, by virtue
of (A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement, or the
Sixth Subscription Agreement (B) the issuance and acquisition of Common Shares
pursuant to the Subscription Agreement or the Sixth Subscription Agreement, (C)
the issuance and acquisition of shares of the Company's Series 1 Preferred
Shares (the "Series 1 Preferred Shares") pursuant to the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement
or the Fifth Subscription Agreement, (D) the issuance and acquisition of Common
Shares upon conversion of the Series 1 Preferred Shares issued and acquired
pursuant to the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement or the Fifth Subscription Agreement, (E) the
issuance and acquisition of Common Shares upon exercise of the Warrants, (F) the
execution and delivery of the Subscription Agreement, the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement,
the Fifth Subscription Agreement or the Sixth Subscription Agreement, or (G) the
consummation of the transactions contemplated by the Subscription Agreement, the
Second Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement."

         (b) The definition of "Distribution Date" in Section 1 of the Rights
Agreement is hereby amended by deleting the last sentence thereof and adding the
following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, neither
(A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, (B) the issuance and acquisition of Common Shares
pursuant to the Subscription Agreement or the Sixth Subscription Agreement, (C)
the issuance and acquisition of Series 1 Preferred Shares pursuant to the Second
Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth Subscription Agreement, (D) the issuance and
acquisition of Common Shares upon conversion of the Series 1 Preferred Shares
issued and acquired pursuant to the Second Subscription Agreement, the Third
Subscription Agreement, the Fourth Subscription Agreement or the Fifth
Subscription Agreement, (E) the issuance and acquisition of Common Shares upon
exercise of the Warrants, (F) the execution and delivery of the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription



                                      -2-
<PAGE>

Agreement, the Fourth Subscription Agreement, the Fifth Subscription Agreement
or the Sixth Subscription Agreement, nor (G) the consummation of the
transactions contemplated by the Subscription Agreement, the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement,
the Fifth Subscription Agreement or the Sixth Subscription Agreement, shall be
deemed to cause a Distribution Date."

         (c) The definition of "Permitted Offer" in Section 1 of the Rights
Agreement is hereby amended and restated in its entirety and replaced with the
following:

         "`Permitted Offer' shall mean (i) a tender offer or an exchange offer
for all outstanding Common Shares, (ii) an issuance of Common Shares or other
equity securities of the Company in connection with a merger, consolidation or
acquisition, in both cases at a price and on terms determined by at least a
majority of the members of the Board of Directors, and concurred in by a
majority of those members who are not officers or employees of the Company and
who are not, and are not representatives, Affiliates or Associates of, an
Acquiring Person or the person making the offer in the case of (i) or the entity
the Company is seeking to merge or consolidate with or acquire, as the case may
be, in the case of (ii), after receiving advice, in the case of either (i) or
(ii), from one or more investment banking firms, to be (a) at a price and on
terms that are fair to shareholders (taking into account all factors that such
members of the Board deem relevant including, without limitation, prices that
could reasonably be achieved if the Company or its assets were sold on an
orderly basis designed to realize maximum value) and (b) otherwise in the best
interests of the Company and its shareholders or (iii) the offer, issuance or
acquisition of (a) Common Shares pursuant to the terms and conditions of the
Subscription Agreement or the Sixth Subscription Agreement, (b) Series 1
Preferred Shares pursuant to the terms and conditions of the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement
or the Fifth Subscription Agreement, (c) Common Shares upon conversion of Series
1 Preferred Shares issued or acquired pursuant to the terms and conditions of
the Second Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth Subscription Agreement, or (d) Common Shares
pursuant to the exercise of the Warrants."

         (d) The definition of "Share Acquisition Date" in Section 1 of the
Rights Agreement is hereby amended by deleting the last sentence thereof and
adding the following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, neither
(A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, (B) the issuance and acquisition of Common Shares
pursuant to the Subscription Agreement or the Sixth Subscription Agreement, (C)
the issuance and acquisition of Series 1 Preferred Shares pursuant to the Second
Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth



                                      -3-
<PAGE>

Subscription Agreement, (D) the issuance and acquisition of Common Shares upon
conversion of the Series 1 Preferred Shares issued and acquired pursuant to the
Second Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth Subscription Agreement, (E) the issuance and
acquisition of Common Shares upon exercise of the Warrants, (F) the execution
and delivery of the Subscription Agreement, the Second Subscription Agreement,
the Third Subscription Agreement, the Fourth Subscription Agreement, the Fifth
Subscription Agreement or the Sixth Subscription Agreement, nor (G) the
consummation of the transactions contemplated by the Subscription Agreement, the
Second Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, shall be deemed to cause a Share Acquisition Date."

         (e) The definition of "Triggering Event" in Section 1 of the Rights
Agreement is hereby amended by deleting the last sentence thereof and adding the
following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, neither
(A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, (B) the issuance and acquisition of Common Shares
pursuant to the Subscription Agreement or the Sixth Subscription Agreement, (C)
the issuance and acquisition of Series 1 Preferred Shares pursuant to the Second
Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth Subscription Agreement, (D) the issuance and
acquisition of Common Shares upon conversion of the Series 1 Preferred Shares
issued and acquired pursuant the Second Subscription Agreement, the Third
Subscription Agreement, the Fourth Subscription Agreement or the Fifth
Subscription Agreement, (E) the issuance and acquisition of Common Shares upon
exercise of the Warrants, (F) the execution and delivery of the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, nor (G) the consummation of the transactions
contemplated by the Subscription Agreement, the Second Subscription Agreement,
the Third Subscription Agreement, the Fourth Subscription Agreement, the Fifth
Subscription Agreement or the Sixth Subscription Agreement, shall constitute a
Triggering Event."

         Section 2. AMENDMENT TO SECTION 11(A)(II) OF THE RIGHTS AGREEMENT.
Section 11(a)(ii) of the Rights Agreement is hereby amended by deleting the last
sentence thereof and adding the following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, neither
(A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription



                                      -4-
<PAGE>

Agreement, (B) the issuance and acquisition of Common Shares pursuant to the
Subscription Agreement or the Sixth Subscription Agreement, (C) the issuance and
acquisition of Series 1 Preferred Shares pursuant to the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement
or the Fifth Subscription Agreement, (D) the issuance and acquisition of Common
Shares upon conversion of the Series 1 Preferred Shares issued and acquired
pursuant to the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement or the Fifth Subscription Agreement, (E) the
issuance and acquisition of Common Shares upon exercise of the Warrants, (F) the
execution and delivery of the Subscription Agreement, the Second Subscription
Agreement, the Third Subscription Agreement, the Fourth Subscription Agreement,
the Fifth Subscription Agreement or the Sixth Subscription Agreement, nor (G)
the consummation of the transactions contemplated by the Subscription Agreement,
the Second Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, shall constitute a Flip-In Event."

         Section 3. AMENDMENT TO SECTION 13(A) OF THE RIGHTS AGREEMENT. Section
13(a) of the Rights Agreement is hereby amended by deleting the last sentence
thereof and adding the following sentence in lieu thereof:

         "Notwithstanding anything in this Agreement to the contrary, neither
(A) the announcement of the transactions contemplated by the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, (B) the issuance and acquisition of Common Shares
pursuant to the Subscription Agreement or the Sixth Subscription Agreement, (C)
the issuance and acquisition of Series 1 Preferred Shares pursuant to the Second
Subscription Agreement, the Third Subscription Agreement, the Fourth
Subscription Agreement or the Fifth Subscription Agreement, (D) the issuance and
acquisition of Common Shares upon conversion of the Series 1 Preferred Shares
issued and acquired pursuant the Second Subscription Agreement, the Third
Subscription Agreement, the Fourth Subscription Agreement or the Fifth
Subscription Agreement, (E) the issuance and acquisition of Common Shares upon
exercise of the Warrants, (F) the execution and delivery of the Subscription
Agreement, the Second Subscription Agreement, the Third Subscription Agreement,
the Fourth Subscription Agreement, the Fifth Subscription Agreement or the Sixth
Subscription Agreement, nor (G) the consummation of the transactions
contemplated by the Subscription Agreement, the Second Subscription Agreement,
the Third Subscription Agreement, the Fourth Subscription Agreement, the Fifth
Subscription Agreement or the Sixth Subscription Agreement, shall constitute a
Flip-Over Event."

         Section 4. AMENDMENT TO SECTION 15 OF THE RIGHTS AGREEMENT. Section 15
of the Rights Agreement is hereby amended by deleting the last sentence thereof
and adding the following sentence in lieu thereof:



                                      -5-
<PAGE>

         "Nothing in this Agreement shall be construed to give any holder of
Rights or any other Person any legal or equitable rights, remedy or claim under
this Agreement in connection with any transactions contemplated by the
Subscription Agreement, the Second Subscription Agreement, the Third
Subscription Agreement, the Fourth Subscription Agreement, the Fifth
Subscription Agreement or the Sixth Subscription Agreement."

         Section 5. DEFINITION. The term "Agreement", as used in the Rights
Agreement, shall be deemed to refer to the Rights Agreement, as amended hereby.

         Section 6. FULL FORCE AND EFFECT. Except as expressly amended hereby,
the Rights Agreement shall continue in full force and effect in accordance with
the provisions thereof on the date hereof.

         Section 7. GOVERNING LAW. This Amendment shall be governed by and
construed in accordance with the laws of the State of Delaware applicable to
contracts to be made and performed entirely within such State.

         Section 8. COUNTERPARTS. This Amendment may be executed in two
counterparts, each of which shall be deemed an original, but both of which
together shall constitute one and the same instrument.

         Section 9. SEVERABILITY. If any term, provision, covenant or
restriction of this Amendment is held by a court of competent jurisdiction or
other authority to be invalid, illegal, or unenforceable, the remainder of the
terms, provisions, covenants and restrictions of this Amendment, and of the
Rights Agreement, shall remain in full force and effect and shall in no way be
effected.

                        [NEXT PAGE IS THE SIGNATURE PAGE]





                                      -6-
<PAGE>

         IN WITNESS WHEREOF, the parties hereto have caused this Seventh
Amendment to be duly executed as of the day and year first above written.


                                       CAPITAL ENVIRONMENTAL RESOURCE INC.



                                       By: /s/ Ivan R. Cairns
                                           -------------------------------------
                                       Name:  Ivan R. Cairns
                                       Title: Executive Vice President, General
                                              Counsel and Secretary



                                       AMERICAN STOCK TRANSFER & TRUST COMPANY



                                       By: /s/ Herbert J. Lemmer
                                           -------------------------------------
                                       Name: Herbert J. Lemmer
                                       Title: Vice President






                                      -7-