Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Qi and -Qs find uninstalled packages when they weren't purged #145

Open
schra opened this issue Aug 27, 2020 · 3 comments
Open

-Qi and -Qs find uninstalled packages when they weren't purged #145

schra opened this issue Aug 27, 2020 · 3 comments

Comments

@schra
Copy link

schra commented Aug 27, 2020

For example, I deinstalled the following package:

$ pacman -R unattended-upgrades
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  daemon libjs-angularjs libjs-d3 libjs-moment
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  unattended-upgrades
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 418 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 442457 files and directories currently installed.)
Removing unattended-upgrades (1.1ubuntu1.18.04.14) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

Altough I deinstalled the package, I can still find with via -Q:

$ pacman -Qs unattended-upgrades
deinstall ok config-files unattended-upgrades	1.1ubuntu1.18.04.14	automatic installation of security upgrades

$ pacman -Qi unattended-upgrades
Package: unattended-upgrades
Status: deinstall ok config-files
Priority: optional
Section: admin
Installed-Size: 408
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Version: 1.1ubuntu1.18.04.14
Config-Version: 1.1ubuntu1.18.04.14
Depends: debconf (>= 0.5) | debconf-2.0, debconf, gir1.2-glib-2.0, powermgmt-base, python3, python3-apt, python3-gi, python3-dbus, ucf, lsb-release, lsb-base, xz-utils
Recommends: cron | cron-daemon | anacron
Suggests: bsd-mailx, default-mta | mail-transport-agent, needrestart
Conffiles:
 /etc/init.d/unattended-upgrades 290829a5efc55b7c435de0bb769f217b
 /etc/kernel/postinst.d/unattended-upgrades 6b7d48fa1e4cd6b8cf445a2fb494288a
 /etc/logrotate.d/unattended-upgrades e45049ee847f069a99e3e6ec39155d4a
 /etc/pm/sleep.d/10_unattended-upgrades-hibernate 0f5d54aa2dd322c805c90e409fc2724a
 /etc/update-motd.d/92-unattended-upgrades afa7546d3fe561e1f5783f7b9cf72096
Description: automatic installation of security upgrades
 This package can download and install security upgrades automatically
 and unattended, taking care to only install packages from the
 configured APT source, and checking for dpkg prompts about
 configuration file changes.
 .
 This script is the backend for the APT::Periodic::Unattended-Upgrade
 option.
Original-Maintainer: Michael Vogt <mvo@debian.org>

Purging the package fixes the problem:

$ sudo apt-get --purge remove unattended-upgrades

$ pacman -Qi unattended-upgrades
dpkg-query: package 'unattended-upgrades' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

My expectation is that removed but un-purged packages are not found via -Qs and -Qi.

@icy
Copy link
Owner

icy commented May 21, 2021

Hi @schra ,

Sorry for my belated response. I didn't configure my notification system correctly and I lost all Github information.

Can you please try pacman -Rn (

dpkg_Rn() {
)

Thanks

@icy
Copy link
Owner

icy commented Jun 16, 2021

@schra Recently I have had chance to use the purge option. This is what I did on some ubuntu systems:

$ pacapt -R --purge filebeat fail2ban

and that did actually purge all configuration files within the packages. Hope this helps.

@icy
Copy link
Owner

icy commented Jun 16, 2021

My expectation is that removed but un-purged packages are not found via -Qs and -Qi.

I think the behavior is actually how apt-based system is working, and I don't think it's a good idea to fix their behavior from our tool. cc @cuonglm fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants