I know following code will remove all package from specific repo.
yum remove $(yum list installed | grep rpmforge | awk '{ print $1 }')
And following code will remove a package without dependencies.
rpm -e --nodeps "php-sqlite2-5.1.6-200705230937"
But i don't know how to use together.
The first “rpm -qa” lists all RPM packages and the grep finds the package you want to remove. Then you copy the entire name and run the “rpm -e –nodeps” command on that package. It will, without prompting for confirmation, remove that package but none of its dependencies.
From now, every time you remove a packages, YUM goes through each package's dependencies and remove them if they are no longer needed by any other package.
Print list of all repositories to get repo id (first column):
$ dnf repolist
Now remove all packages of selected repo:
# dnf repository-packages <repo-id> remove
See repository-packages section of dnf
manual page for details regarding manipulation with all packages in specific repository.
Try the following command:
rpm -e --nodeps `yum list installed | grep rpmforge | awk '{ print $1 }'`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With