Merely "signing out" of iCloud leaves locally stored documents (files, pictures, email messages etc) untouched.
I am not quite sure what you mean by "disable" though. Of course you can use iCloud.com with your Apple Account, for which only you should have access regardless of the particular device you are using.
Do you want to delete your Apple Account? If that's really what you want to do I will provide those instructions, but perhaps you ought to start at the beginning and explain.
Are you selling, disposing of or otherwise parting with your older iMac? Read What to do before you sell, give away, trade in, or recycle your Mac - Apple Support.