Exhibit 5 [Dewey Ballantine LLP Letterhead] June 26, 1998 Omnicare, Inc. 50 East RiverCenter Blvd. -- Suite 1530 Covington, Kentucky 41011 Ladies and Gentlemen: We have acted as special counsel to Omnicare, Inc., a Delaware corporation ("Omnicare"), in connection with the filing by Omnicare of a Registration Statement on Form S-8 (the "Registration Statement") under the Securities Act of 1933 for the registration of up to 213,401 shares of common stock, $1.00 par value per share (the "Shares"), of Omnicare which may be issued under the 1996 Stock Option Plan of CompScript, Inc., as amended, referred to therein (the "Plan"). For the purpose of rendering the opinion set forth herein, we have been furnished with and examined such certificates and other documents as we have deemed necessary or advisable for the purpose of expressing the opinion contained herein. With respect to all of the documents reviewed, we have assumed, without investigation, the genuineness of all signatures, the authenticity of all documents submitted to us as originals and the conformity to originals of all documents submitted to us as certified or reproduced copies. We are admitted to the Bar of the State of New York and express no opinion as to the laws of any other jurisdiction other than the General Corporation Law of the State of Delaware. Based on and subject to the foregoing, we are of the opinion that the issuance of the Shares upon exercise of the options contemplated by the Plan (the "Options"), has been duly authorized by Omnicare and when the Shares have been issued as authorized in accordance with the terms of the Options, the Shares will be validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as Exhibit 5 to the Registration Statement. In giving such consent, we do not thereby admit that we come within the category of persons whose consent is required under Section 7 of the Securities Act of 1933 or the rules and regulations of the Securities and Exchange Commission thereunder. Very truly yours, /s/ Dewey Ballantine LLP DEWEY BALLANTINE LLP