#!/bin/bash

package=maria

pkgs=($(rpm -qa | grep "$package"))

for i in "${pkgs[@]}"
do
rpm -e --nodeps $i
done