How to remove old bootcamp partition in terminal
To convert a container to free space requires two commands. For example, disk0s3 is a APFS container. To convert to free space, you would need to enter the following commands.

sudo diskutil apfs deleteContainer disk0s3
sudo diskutil eraseVolume free none disk0s3


Free space can be added to a container, if the free space reside immediately after the container. In your case, if you converted disk0s3 to free space, then you probably would be able add this free space to disk0s2, by entering the command given below.

sudo diskutil apfs resizeContainer disk0s2 0


&nbsp;