我想在我的 ubuntu 虚拟盒中卸载一个名为 Knockpy 的软件包。当我尝试卸载它时,它显示如下
sudo apt-get remove knockpy
[sudo] password for david:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'knockpy' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
但如果我去终端并检查已安装的版本,它就在那里可见......
david@david:~/Desktop$ knockpy --version
KNOCKPY 7.0.1
david@david:~/Desktop$
avid@david:~/Desktop$ knockpy
usage: KNOCKPY [-h] [-d DOMAIN] [-f FILE] [-v] [--dns DNS]
[--useragent USERAGENT] [--timeout TIMEOUT] [--threads THREADS]
[--recon] [--bruteforce] [--wordlist WORDLIST] [--wildcard]
[--json] [--save FOLDER] [--report REPORT]
knockpy v.7.0.1 - Subdomain Scan
https://github.com/guelfoweb/knock
options:
-h, --help show this help message and exit
-d DOMAIN, --domain DOMAIN
domain to analyze
-f FILE, --file FILE domain list from file path
-v, --version show program's version number and exit
--dns DNS custom dns
--useragent USERAGENT
custom useragent
--timeout TIMEOUT custom timeout
--threads THREADS custom threads
--recon subdomain reconnaissance
--bruteforce subdomain bruteforce
--wordlist WORDLIST wordlist file to import
--bruteforce option required
--wildcard test wildcard and exit
--json shows output in json format
--save FOLDER folder to save report
--report REPORT shows saved report
我通过以下命令安装了这个knockpy工具
git clone https://github.com/guelfoweb/knock.git
cd knock
pipx install git+https://github.com/guelfoweb/knock.git
我再次检查包裹是否仍然可见
david@david:~/Desktop$ apt show knockpy
Package: knockpy
Version: 7.0.0-2
Priority: optional
Section: universe/python
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Gianfranco Costamagna <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 119 kB
Depends: python3-bs4 (>= 4.12.3), python3-dnspython, python3-openssl, python3-requests, python3-tqdm, python3:any
Homepage: https://github.com/guelfoweb/knock
Download-Size: 35.4 kB
APT-Sources: http://in.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
Description: Python3 tool designed to enumerate subdomains on a target domain
Knockpy is a Python tool designed to enumerate subdomains on a target domain
through a wordlist.
david@david:~/Desktop$ pipx uninstall knockpy Nothing to uninstall for knockpy 😴 ⚠️ Note: '/home/david/.local/bin/knockpy' still exists on your system and is on your PATH david@david:~/Desktop$
someone please look into these issue. what went wrong ?
当你使用不同的软件包格式(deb、snap等)时,你必须使用适合该包格式的工具。
apt
仅适用于 .deb 包。但您没有使用 .deb 包。您使用了为pip
或设计的 .git 包pipx
。使用安装
pipx
意味着使用删除pipx
通常来说,避免使用不熟悉的包装方法是明智的。
运行
which knockpy
以查看是否仍有 knockpy 的可执行文件安装。运行pipx show-app-dir knockpy
以显示 knockpy 的安装目录。使用 导航到该目录cd
并使用 删除整个目录rm -rf <directory_name>
(在本例中knock
)。结果
apt policy knockpy
将显示来自 universe 存储库的 knockpy 是否当前安装在您的系统上。apt policy knockpy
Ubuntu 24.04 中的结果:在这种情况下,由 apt 安装的 knockpy 软件包
sudo apt install knockpy
当前未安装。apt policy knockpy
不会返回 apt 未安装的软件包的结果。例如,它不会返回由 apt 安装的软件包的结果pipx install