How to delete a downloaded OS X automatic update?
Try looking in /Library/Updates
. The updates will be installer packages with extension .pkg
Trashing the contents of Library/Updates is usually not possible because OS X El Capitan and later includes security technology called SIP (System Integrity Protection) that helps protect your Mac from malicious software.
While doing so you must have seen the pop ups saying "0##-##### can't be modified or deleted because it's required by macOS" or from the terminal saying "Operation not permitted"
Still if you want to delete those directories or files saved as a result of failed or incomplete updates(which takes significant unnecessary storage) you can do so by turning off Mac's SIP temporarily. This is an advanced solution and recommended for advanced users only. It may open up your system for vulnerabilities and needs to done with care.
The following are the steps:
Restart your Mac in recovery mode(press and hold Command (⌘)-R at the start-up).
Open the Terminal Utility.
Type the command
csrutil disable
(This gives full unrestricted access to your Mac's entire OS and every file and folder, so, be cautious!)After restarting, open the Terminal and delete the desired folders by running the command:
sudo rm -R /Library/Updates/0##-#####
Now the files or folders which were restricted can be removed.
Note: (0##-##### is the folder name)
To delete specific file inside the folder 0##-##### you can simply use rm provided the path of that file.
When done with all the desired removing, follow steps 1 and 2 to turn SIP back on using the command:
csrutil enable
Restart your Mac and SIP should be back on track.
Note: To check the status of the SIP. Use command
csrutil status
- Download and Install fresh updates if available.
I hope this is helpful :)
Reference: https://appletoolbox.com/seeing-error-operation-not-permitted-in-macos-mojave/