A
"Avast" is the worst of the whole wretched lot of commercial "security" products for the Mac. Not only does it fail to protect you from any real danger, it may send personal data (such as web browsing history and the contents of email messages) back to the developer without your knowledge, give false warnings, destabilize and slow down the computer, expose you to network attack, and corrupt the network settings and the permissions of files in your home folder. Removing it may not repair all the damage.
Some versions of the product also inject advertising into web pages. In short, apart from the fine print in the license agreement, Avast is indistinguishable from malware, and is arguably worse than any known malware now in circulation.
Back up all data, then remove Avast according to the developer's instructions. Restart. Never install any "anti-virus" or "anti-malware" software again.
If you tried to remove Avast by dragging an application to the Trash, you'll have to reinstall it and then follow the instructions linked above.
B
"CleanMyMac" is a scam and a common cause of instability and poor performance. Depending on what version you have, the developer's instructions may not completely remove it. Follow those instructions, then do as below.
Back up all data before proceeding.
Triple-click anywhere in the line below on this page to select it:
/Library/LaunchDaemons/com.macpaw.CleanMyMac2.Agent.plist
Right-click or control-click the highlighted line and select
Services ▹ Reveal in Finder (or just Reveal)
from the contextual menu.* A folder may open with an item selected. If it does, move the selected item to the Trash. You may be prompted for your administrator login password.
Repeat with this line:
/Library/PrivilegedHelperTools/com.macpaw.CleanMyMac2.Agent
Restart the computer and empty the Trash.
You may also have to remove one or more of these items in the same way:
~/Library/LaunchAgents/com.macpaw.CleanMyMac.helperTool.plist
~/Library/LaunchAgents/com.macpaw.CleanMyMac.volumeWatcher.plist
~/Library/LaunchAgents/com.macpaw.CleanMyMac3.Scheduler.plist
Never again install "CleanMyMac" or anything like it.
*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
Go ▹ Go to Folder...
from the menu bar and paste into the box that opens by pressing command-V. You may not see what you pasted because a line break is included. Press return.
C
You, or someone using the computer, may have installed a keylogger called "Elite Keylogger." If so, and if you don't know how it got there, you have a serious problem. Is there an app named "Install Elite Keylogger" in the Applications folder?