Installation problem in Ubuntu 20.04

amdgpu and amdgpu-dkms are the problematic packages here because they are either not fully installed or corrupted.

Use the following command to solve the issue:

sudo dpkg -P amdgpu && sudo dpkg -P amdgpu-dkms 

This removes the package, but sometimes returns the same error:

dpkg returned error code (1) 

In that case, you must manually delete it by running the following:

sudo mv /var/lib/dpkg/info/amdgpu* /tmp

This will move all the components of the package you listed to the /tmp directory. You can later remove them if you want.

Then run these commands to update the software cache:

sudo apt update 
sudo apt upgrade -y

Feel free to ask me any questions in the comments.