![](/img/trans.png)
[英]How can I move multiple folders that contain specific word in the name to another directory in linux?
[英]Remove packages contain specific word in name
在Linux(Fedora)中,我如何查看所有已安裝的軟件包,這些軟件包的軟件包名稱中包含某些單詞。 然后,刪除所有已安裝的軟件包。
假設您使用的是基於Debian的Linux(例如,Ubuntu或Mint),則可以這樣搜索mysq
:
dpkg -l | grep mysq
並僅獲取名稱
dpkg -l | grep mysq | awk '{print $2}'
如果要刪除所有包含特定單詞的軟件包,則無需通過grep或其他方式傳遞列表。 只需輸入
$ sudo yum remove "*word*"
如果要在刪除之前查看此類軟件包的列表,請鍵入
$ rpm -qa "*word*"
而已。
在linux中,您可以在各種地方安裝程序。 在大多數情況下,發行版上的rpm負責刪除程序的所有零碎部分。 一種解決方案(盡管充滿了危險)是像這樣grep您的usr / bin:
ls /usr/bin || grep 'some package name'
並將其輸送到rm-rf ...'shuddurs'
一個更安全的選擇是僅在第二次使用apt-get卸載'someApp'
Fedora是基於RPM
的發行版。 因此,您將需要使用rpm
或yum
命令。
要列出已安裝列表: yum list installed | grep <name>
yum list installed | grep <name>
或rpm -a | grep <name>
rpm -a | grep <name>
刪除軟件包: rpm -e <package-name>
或yum remove <package-name>
資料來源:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.