<Page>

                                                                    EXHIBIT 3.40

                                     IESI PA
                         Blue Ridge Landfill Corporation

                                     BY-LAWS

                                    ARTICLE I

                                     SHARES

          1.    CERTIFICATES OF SHARES shall be issued to each holder of
fully-paid shares, in numerical order from the share certificate books, signed
by the President or Vice-President, countersigned by the Secretary or Treasurer
and sealed with the corporate seal. A record of each certificate issued shall be
kept on the stub thereof.

          2.    EVERY SHAREHOLDER OF RECORD shall be entitled to a share
certificate representing the shares owned by him, but a share certificate shall
not be issued to any shareholder until the shares represented thereby have been
fully paid. No note or obligation given by a shareholder, whether secured by
pledge or otherwise, shall be considered as payment in whole or in part, of any
shares.

          3.    TRANSFERS OF SHARES shall be made only upon the books of the
corporation, and before a new certificate is issued, the old certificate must be
surrendered for cancellation. The corporation shall not be bound by any
restrictions on the transferability of shares imposed by any agreement to which
it is not a party unless both written notice of such agreement or restriction is
given to the Secretary and notice of such agreement or restriction has been put
upon the stock certificate(s) so restricted.

          4.    IN CASE A SHARE CERTIFICATE IS LOST OR DESTROYED, the claimant
thereof shall make an affirmation or affidavit of the fact and advertise the
same in such manner as the Board of Directors may require, and shall give the
corporation a bond of indemnity in form and amount acceptable to the Board and
with one or more sureties satisfactory to the Board and upon satisfactory proof
being produced to the Board of Directors of such loss or destruction, a new
certificate may be issued of the same tenor and for the same number of shares as
the one alleged to be lost or destroyed, but always subject to the approval of
the Board of Directors.

          5.    THE HOLDER OF RECORD OF ANY SHARE OR SHARES shall be entitled to
be treated by the corporation as the holder in fact thereof, and the company
accordingly shall not be bound to recognize any equitable claim to or interest
in such share on the part of any other person, whether or not it shall have
express or other notice thereof, save as expressly provided by applicable laws.

          6.    A SHAREHOLDER SHALL NOT BE PERSONALLY LIABLE for any debt or
liability of the corporation, except as may be imposed by law.

          7.    THE TREASURY STOCK of the corporation shall consist of such
issued and outstanding shares of the corporation as may be donated to the
corporation or otherwise acquired, and shall be held subject to disposal by the
Board of Directors. Such shares shall neither vote nor participate in dividends
while held by the corporation.

<Page>

                                   ARTICLE II

                                  SHAREHOLDERS

          1.    THE ANNUAL MEETING OF THE SHAREHOLDERS of this corporation shall
be held at such place either within or without the Commonwealth of Pennsylvania,
on such date and at such time as may be designated by the Board of Directors.
Failure to hold the annual meeting at the designated time shall not work any
forfeiture or dissolution of the corporation.

          2.    SPECIAL MEETINGS OF THE SHAREHOLDERS may be called to be held at
the registered office of the corporation, or at such other place designated in
the call, at any time, by the President or by resolution of the Board of
Directors, or upon written request of the shareholders holding one-fifth of the
outstanding shares having voting rights. Upon written request of the shareholder
or shareholders entitled to call a special meeting, the Secretary shall give
notice of such special meeting, to be held at such time as the Secretary may
fix, not less than ten nor more than sixty days after the receipt of such
request. Upon neglect or refusal of the Secretary to issue such call, the person
or persons making the request may do so.

          3.    AT LEAST FIVE DAYS BEFORE EACH MEETING OF SHAREHOLDERS, the
officer having charge of the transfer books for shares shall make a complete
list of the shareholders entitled to vote at the meeting, arranged in
alphabetical order, with the address of, and the number of shares held by each,
which list shall be kept on file at the registered office of the corporation and
shall be subject to inspection of any shareholders at any time during usual
business hours. Such list shall be produced and kept open at the time and place
of meeting, subject to the inspection of any shareholders during the whole time
of the meeting. The preparation of such list may be dispensed with by oral or
written agreement of all the shareholders.

          4.    EXCEPT AS HEREIN OTHERWISE PROVIDED, NOTICE OF MEETING, written
or printed for every regular or special meeting of the shareholders shall be
prepared and mailed to the last known post office address of each shareholder
having voting rights, not less than five days before any such meeting, and if
for a special meeting, such notice shall state the object or objects thereof. No
failure of or irregularity in notice of any regular meeting shall invalidate
such meeting or any proceeding thereat. Notice of a meeting may be waived by
written waiver signed by all persons entitled to notice.

          5.    A QUORUM at any meeting of the shareholders shall consist of a
majority of the voting shares of the corporation, represented in person or by
proxy. A majority of such quorum shall decide any question that may come before
the meeting unless such question is by statute required to be decided by a
majority of the outstanding shares or otherwise.

          6.    THE ELECTION OF DIRECTORS shall be held at the annual meeting of
the shareholders, and every shareholder entitled to vote shall have the right,
in person or by proxy, to multiply the number of votes to which he may be
entitled by the number of directors to be elected, and he may cast the whole
number of such votes for one candidate or he may distribute them among any two
or more candidates.

                                       -2-
<Page>

          7.    REMOVAL OF DIRECTORS. The Board of Directors, or any member
thereof, may be removed at any time by a majority vote of the holders of the
outstanding shares entitled to vote at an election of directors, in the manner
provided by law. Vacancies so occasioned may be filled at the same meeting.

          8.    THE ORDER OF BUSINESS at the annual meeting, and as far as
possible, at all other meetings of the shareholders shall be:

                (a)   Call of roll
                (b)   Proof of due notice of meeting
                (c)   Reading and disposal of any unapproved minutes
                (d)   Reports of officers and committees
                (e)   Fixing the number of directors and election of directors
                (f)   Unfinished business
                (g)   New business
                (h)   Adjournment

          9.    SHAREHOLDERS SHALL HAVE the right to be represented and vote by
proxy at any meeting of shareholders.

          10.   Any action which may be taken at a meeting of shareholders may
be taken without a meeting, if a consent in writing, setting forth the action so
taken, shall be signed by all of the shareholders who would be entitled to vote
at a meeting for such purpose(s) and shall be filed with the Secretary of the
company.

                                   ARTICLE III

                                    DIRECTORS

          1.    SO LONG- AS ALL THE SHARES OF THIS CORPORATION are owned
beneficially and of record by only one or two shareholders, the business and
property of the corporation shall be managed by a Board of not fewer than the
number of shareholders. At such time as the shares are owned beneficially and of
record by more than one or two shareholders, the business and property of the
corporation shall be managed by a Board of not fewer than three (3) nor more
than twenty-one (21) directors, who shall be natural persons of full age, and
who shall be elected annually by the shareholders having voting rights, for the
term of one year, and shall serve until the election and acceptance of their
duly qualified successors. Directors need not be shareholders. Any vacancies,
including vacancies resulting from an increase in the number of directors, may
be filled by the Board of Directors, though less than a quorum, for the
unexpired term. The Board of Directors shall have full power, and it is hereby
expressly authorized, to increase, or decrease, the number of directors from
time to time without requiring a vote of the stockholders.

                                       -3-
<Page>

          2.    THE ANNUAL MEETING of the Board of Directors shall be held at
the offices of the corporation within thirty (30) days following the annual
meeting of shareholders.

          3.    REGULAR MEETINGS of the Board of Directors shall be held no less
than quarterly at such place and on such date and time as may be designated by
the Board of Directors. The meetings may be dispensed with by written or oral
agreement of all the directors when, in their opinion, there is insufficient
business to necessitate or justify a meeting. Notice of regular meetings need
not be communicated to the directors.

          4.    SPECIAL MEETINGS of the Board of Directors, to be held in the
registered office of the corporation or elsewhere, may be called at any time by
the President, or by a majority of the members of the board, or may be held at
any time and place, either within or without the Commonwealth of Pennsylvania,
either with notice as provided in Section 5 or without notice if by written
consent of all the absent members and by the presence of all other members at
such meeting.

          5.    NOTICE OF SPECIAL MEETINGS shall be given by any means of
communication by the Secretary to each member of the board not less than twelve
(12) hours before any such meeting, and notice of such special meetings shall
include the purposes thereof. Notice of such meetings may be waived by written
waiver signed by all the directors.

          6.    A QUORUM at any meeting shall consist of a majority of the
entire membership of the board. A majority of such quorum shall decide any
question that may come before the meeting, unless otherwise provided by statute.

          7.    EXECUTIVE COMMITTEE. The Board of Directors may, by resolution
adopted by a majority of the whole board, delegate not less than two of its
number to constitute an executive committee which, to the extent provided in
such resolution, shall have and exercise the authority of the Board of Directors
in the management of the business of the corporation. Written minutes shall be
kept of all actions taken by the executive committee between intervals of the
regular meetings of the Board of Directors, and these minutes must be reported
at the next regular meeting of the Board.

          8.    SPECIAL COMMITTEES. The Board of Directors may, by specific
resolution adopted by a majority of the whole board, delegate not less than two
of its number to constitute a special committee which, to the extent and scope
provided in such resolution, shall have and exercise authority in such matters
as the Board shall declare. Written minutes shall be kept of all actions taken
by any such special committee between intervals of the regular meetings of the
Board of Directors, and these minutes must be reported at the next regular
meeting of the Board.

          9.    ONE OR MORE DIRECTORS may participate in a meeting of the board
or of an executive or other committee of the Board by means of conference
telephone or similar communications equipment by means of which all persons
participating in the meeting can hear each other.

                                       -4-
<Page>

          10.   OFFICERS OF THE CORPORATION, including the President, shall be
elected by ballot, by the Board of Directors, at their first meeting after the
election of directors each year. If any office becomes vacant, including the
office of the President, during the year, the Board of Directors shall fill the
same for the unexpired term. The President shall be chosen from the Board of
Directors.

          11.   INSPECTION OF THE BOOKS AND ACCOUNTS of the corporation (except
in such cases as may be allowed by law) may be permitted only in accordance with
such rules and regulations and under such conditions as the Board of Directors
shall from time to time determine upon, and the shareholders' rights in this
respect are and shall be restricted and limited accordingly.

          12.   The order of business at any regular or special meeting of the
Board of Directors shall be:

                (a)   Reading and disposal of any unapproved minutes
                (b)   Reports of officers and committees
                (c)   Unfinished business
                (d)   New business
                (e)   Adjournment

                                   ARTICLE IV

                                    OFFICERS

          1.    THE OFFICERS OF THE CORPORATION shall be a President, a Vice
President, a Secretary, a Treasurer and such other officers, assistant officers,
and agents as the Board of Directors may determine and all officers, and agents
shall be elected for the term of one year and shall hold office until their
successors are elected and qualified. Any two or more offices may be held by the
same person including the offices of President and Secretary.

          2.    THE PRESIDENT shall be the chief executive officer of the
corporation, shall preside at all meetings, shall have general supervision of
the affairs of the corporation, shall sign or countersign all certificates,
contracts, and other instruments of the corporation, as authorized by the Board
of Directors; shall make reports to the directors and shareholders, and shall
perform all such other duties as are incident to his office or are properly
required by him by the Board of Directors.

          3.    THE VICE PRESIDENT, in the absence or disability of the
President, shall exercise all his functions. The Vice President shall also
perform such other duties as are properly required of him by the Board of
Directors.

          4.    THE SECRETARY shall issue notices for all meetings, shall keep
their minutes, shall have charge of the seal and the books of the corporation,
shall sign with the President such instruments as require such signature, and
shall make such reports and perform such other duties as are incident to his
office, or are properly required of him by the Board of Directors.

                                       -5-
<Page>

          5.    THE TREASURER shall have the custody of all monies and
securities of the corporation and shall keep regular books of account. He shall
sign or countersign such instruments as require his signature, shall perform all
duties incident to his office or that are properly required of him by the Board
of Directors, and if required by the Board of Directors, shall give bond for the
faithful performance of his duties in such sum and with such sureties as may be
required by the Board of Directors.

          6.    ALL OTHER OFFICERS, ASSISTANT OFFICERS, AND AGENTS shall perform
such duties as may be required of them by the Board of Directors. All officers,
assistant officers, and agents of the corporation shall be subject to removal by
the Board of Directors whenever in its judgment the best interests of the
corporation will be served thereby, but such removal shall be without prejudice
to the contract rights, if any, of the person removed.

          7.    COMPENSATION. The Board of Directors shall have power to fix the
compensation of all officers and assistant officers of the corporation. It may
authorize any officer upon whom the power of appointing subordinate officers may
have been conferred, to fix the compensation of such subordinate officers.

                                    ARTICLE V

                              DIVIDENDS AND FINANCE

          1.    DIVIDENDS shall be declared as provided by law at such times as
the Board of Directors shall direct, and no dividend shall be declared that will
impair the capital of the corporation.

          2.    THE MONIES of the corporation shall be deposited in the name of
the corporation, in such banks or trust companies as the Board of Directors
shall designate, and shall be drawn out only by check signed as directed by the
Board of Directors.

          3.    THE COMPENSATION OF OFFICERS AND DIRECTORS of the corporation
shall be in such amount or at such rate as shall be fixed by order of the Board
of Directors or by such person or persons as may be delegated by the Board of
Directors.

          4.    FINANCIAL REPORTS. The officers of the corporation shall tender
to the Board of Directors such financial reports of the condition of the
corporation as may be required by the Board of Directors. The directors and
officers shall be required to forward to the shareholders an annual financial
report at the close of each fiscal year. No report of the financial condition of
the corporation need be prepared or verified by a certified public accountant,
unless directed to be so prepared or verified by an order of the Board of
Directors.

          5.    A FISCAL YEAR basis may be established for the operations of the
corporation by the Board of Directors.

          6.    THE TREASURER, with the approval of the President, may make
charitable contributions out of the funds of the corporation for purposes
permitted by law, without the consent of the shareholders or directors, to the
extent that such contributions shall be deductible

                                       -6-
<Page>

by the corporation for income tax purposes; provided, however, that full report
of such contributions shall be made to the Board of Directors at its next
meeting.

                                   ARTICLE VI

                                      SEAL

          1.    THE CORPORATE SEAL of the corporation shall consist of two
concentric circles, between which is the name of the corporation, and the word
"Pennsylvania", and in the circle shall be inscribed the words "Corporate Seal"
together with the year of incorporation, and such seal is impressed on the
margin hereof and is hereby adopted as the corporate seal of the corporation.

                                   ARTICLE VII

                                  MISCELLANEOUS

          1.    THE CORPORATION may enter into contracts or transact business
with one or more of its directors, officers and shareholders, or with any
corporation, partnership, association, trust company, organization, or other
concern in which any one or more of its directors, officers, or shareholders is
in any way interested; and in the absence of fraud, no such contract or
transaction shall be invalidated or in any way affected by the fact that such
directors, officers, or shareholders of the corporation have such interests,
even if such interests are adverse to the interests of the corporation, and even
though the vote of such directors, officers, or shareholders having such adverse
interest may have been necessary to obligate the corporation upon such contract
or transaction. At any meeting of the Board of Directors of the corporation (or
any duly authorized committee thereof) which shall authorize or ratify any such
contract or transaction, any such director may be included to constitute a
quorum. In any such case, the nature of such interest (not necessarily the
detail or the extent thereof) shall be disclosed or shall have been known to the
Directors. A general notice that the director, officer or shareholder is
interested in any corporation or concern shall be a sufficient disclosure with
respect to all contracts and transactions with such corporation or other
concern. No person shall be disqualified from holding office as director or
officer of any corporation by reason of any such adverse interest. In the
absence of fraud, no director, officer, or shareholder having such adverse
interest shall be liable to any corporation or to any shareholder or creditor
thereof, or to any other person for any loss incurred under or by reason of such
contract or transaction, nor shall any such director, officer, or shareholder be
accountable for any gain or profit realized on any such contract or transaction.

          2.    THIS PROVISION shall be in addition to, and not in limitation
of, any applicable provisions of law protecting interested directors, officers,
and stockholders.

                                       -7-
<Page>

                                  ARTICLE VIII

                                 INDEMNIFICATION

          1.    INDEMNIFICATION OF DIRECTOR, OFFICERS AND REPRESENTATIVES. Each
director, each officer and each other person who may have acted as a
representative of the company at its request, and his heirs, executors and
administrators, shall be indemnified by the company against any costs and
expenses, including counsel fees, reasonably incurred in connection with any
civil, criminal, administrative or other claim, action, suit or proceeding in
which he or they may become involved or with which he or they may be threatened,
by reason of his being or having been a director or officer of the company or by
reason of his serving or having served any corporation, trust, committee, firm
or other organization as director, officer, employee, trustee, member or
otherwise at the request of the company, and against any payments in relation to
any matter as to which he shall be finally adjudged derelict in the performance
of his duties to the company, or in relation to any matter as to which there has
been no adjudication with respect to his performance of his duties to the
company unless the company shall receive an opinion from independent counsel
that the director, officer, or representative has not so been derelict. In the
case of a criminal action, suit or proceeding, a conviction or judgment (whether
after trial or based on a plea of guilty or nolo contendere or its equivalent)
shall not be deemed an adjudication that the director, officer or representative
was derelict in the performance of his duties to the company if he acted in good
faith in what he considered to be the best interests of the company and with no
reasonable cause to believe the action was illegal. The foregoing right of
indemnification shall not be exclusive of other rights to which directors,
officers and others may be entitled as a matter of law or otherwise.

          2.    This corporation shall have power to purchase and maintain
insurance on behalf of any person who is or was a director, officer, employee or
agent of the corporation, or is or was serving at the request of the corporation
as a director, officer, employee or agent of another corporation, partnership,
joint venture, trust or other enterprise against any liability asserted against
him and incurred by him in any such capacity, or arising out of his status as
such, whether or not the corporation would have the power to indemnify him
against such liability.

                                   ARTICLE IX

                                EMERGENCY BY-LAWS

          1.    EMERGENCY POWERS. During any emergency resulting from warlike
damage, including civil disorder, or an attack on the United States or any
nuclear or atomic disaster, the regular by-laws shall be suspended to the extent
necessary under the circumstances and the Board of Directors may make any
emergency by-law that may be practical or necessary for the circumstances of the
emergency, even though inconsistent with the regular by-laws. No director,
officer, or employee acting in accordance with any such emergency by-laws shall
be liable, except for willful misconduct.

                                       -8-
<Page>

          2.    MEETINGS. A meeting of the Board of Directors may be called by
any officer or director with no prescribed period of notice, so long as an
attempt is made to notify each director as soon as conditions may permit. Such
notice may be given by any feasible means at the time, including publication or
radio.

          3.    QUORUM. The director or directors in attendance at the meeting
of the Board shall constitute a quorum.

          4.    EMERGENCY DIRECTORS. Prior to such an emergency, the Board of
Directors may designate officers or other persons who shall serve as directors
in emergency meetings in the event that the elected directors for any reason be
rendered incapable of discharging their duties.

          5.    LINES OF SUCCESSION. The Board of Directors, either before or
during any such emergency, may provide, and from time to time modify, lines of
succession in the event that during such an emergency any or all officers or
agents of the corporation shall for any reason be rendered incapable of
discharging their duties.

          6.    TERMINATION. Upon termination of the emergency, as declared by
the Board of Directors or other person discharging their duties, the emergency
by-laws shall cease to be operative.

          7.    SHAREHOLDERS. The emergency by-laws, in total or in some portion
thereof, are subject to repeal or change by action of a majority of the
shareholders.

                                    ARTICLE X

                                   AMENDMENTS

          1.    These By-Laws may be amended, repealed or altered in whole or in
part, by a majority vote of the outstanding shares of the corporation, at any
regular or special meeting of the shareholders. Written notice shall, not less
than five days before the shareholders' meeting is called by the Board of
Directors for the purpose of considering proposed amendments, be given to each
shareholder of record entitled to vote. Such notice shall set forth the proposed
amendment or a summary of the changes to be effected thereby.

          2.    THESE BY-LAWS MAY ALSO BE AMENDED, repealed or altered, in whole
or in part by a majority vote of the Board of Directors, at any regular or
special meeting. However, such By-Laws, or any provision thereof, made, altered,
amended, or repealed by the Board of Directors shall from time to time be
submitted to the shareholders for approval, and may be altered, amended, or
repealed by the shareholders at any annual meeting or upon notice at any special
meeting, and when so altered, amended, or repealed shall not be re-established
by the Board of Directors without the approval of the shareholders.

                                       -9-