How to block updates to macOS by terminal

Open the terminal, and check macOS updates with the following command:

sudo /usr/sbin/softwareupdate -l

You may see the following information in the terminal:

Software Update Tool

Finding available software
Software Update found the following new or updated software:
* Label: macOS Catalina 10.15.4 Update-
Title: macOS Catalina 10.15.4 Update, Version: , Size: 4937259K, Recommended: YES, Action: restart,

The block the corresponding update with the command:

sudo /usr/sbin/softwareupdate --ignore "macOS Catalina 10.15.4 Update"

Re-run the first command to check whether the update is blocked:

$ sudo /usr/sbin/softwareupdate -l
Software Update Tool

Finding available software
No new software available.

When you decide you want to allow the updates again, you can use:

sudo /usr/sbin/softwareupdate --reset-ignored