What is the equivalent of the Redhat command rpm -e in Ubuntu? I know it's probably dpkg something because the equivalent of rpm -qa is dpkg -l, but I can't tell what the equivalent command of rpm -e is in Ubuntu. However, I think it's dpkg -r aka --remove <package-name> or --remove-architecture, but I'm not sure.
This is different from the question about how to remove an application in Ubuntu because I want know the most exact equivalent in terms of actions performed of the rpm -e command and not just generally how to remove an application, even if apt or apt-get remove packagename is the recommended or preferred way and not dpkg -r packagename or dpkg --remove packagename.