Hi @Yan, Jayden,
Please refer to this blog: https://www.sqlservercentral.com/blogs/uninstalling-sql-server-from-the-command-line-to-remove-unwanted-background-instances
Navigate to the location of the SQL Server setup media. Run the following command to start the uninstallation process:
setup.exe /q /action=uninstall /instancename=<instance name> /features=<comma separated feature list>
You can get a list of features by running the following command:
setup.exe /action=uninstall /help
It means to see its supported features, you could see that there is /action which could be uninstall, and /QUIET (Setup will not display any user interface.) and /QUIETSIMPLE (Setup will display progress only without any user).
Hope this would give you some help.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".