How packages installation/removal is performed on the distribution you are using?
Answer
The answer depends on the distribution being used.
In Fedora/CentOS/RHEL/Rocky it can be done with rpm or dnf commands.
In Ubuntu it can be done with the apt command.