如何从没有依赖项的特定仓库中删除所有包

时间:2023-02-05 15:16:12

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.

但我不知道如何一起使用。

4 个解决方案

#1


15  

Try the following command:

请尝试以下命令:

rpm -e --nodeps `yum list installed | grep rpmforge | awk '{ print $1 }'`

#2


19  

Print list of all repositories to get repo id (first column):

打印所有存储库列表以获取repo id(第一列):

$ 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.

有关与特定存储库中的所有包进行操作的详细信息,请参阅dnf手册页的repository-packages部分。

#3


2  

Check to Make Sure That You're Erasing Only What You Want To

检查以确保您只删除您想要的内容

dnf list installed | grep package_name.i686 | awk '{ print $1 }' | less

Actually Do The Removing

实际上是删除

sudo rpm -e --nodeps `dnf list installed | grep package_name.i686 | awk '{ print $1 }'`

#4


2  

I like using
yum -y autoremove yum list installed | grep rpmforge | awk '{ print $1 }'

我喜欢使用yum -y autoremove yum list安装| grep rpmforge | awk'{print $ 1}'

#1


15  

Try the following command:

请尝试以下命令:

rpm -e --nodeps `yum list installed | grep rpmforge | awk '{ print $1 }'`

#2


19  

Print list of all repositories to get repo id (first column):

打印所有存储库列表以获取repo id(第一列):

$ 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.

有关与特定存储库中的所有包进行操作的详细信息,请参阅dnf手册页的repository-packages部分。

#3


2  

Check to Make Sure That You're Erasing Only What You Want To

检查以确保您只删除您想要的内容

dnf list installed | grep package_name.i686 | awk '{ print $1 }' | less

Actually Do The Removing

实际上是删除

sudo rpm -e --nodeps `dnf list installed | grep package_name.i686 | awk '{ print $1 }'`

#4


2  

I like using
yum -y autoremove yum list installed | grep rpmforge | awk '{ print $1 }'

我喜欢使用yum -y autoremove yum list安装| grep rpmforge | awk'{print $ 1}'