I recently installed silversearcher-ag
with sudo
and uninstalled it as it required sudo
to run the command every single time.
The command I used to install and uninstall this package respectively:
# installation sudo apt install silversearcher-ag
# uninstallation sudo apt remove silversearcher-ag sudo apt autoremove
As mentioned by the comment, here's the output for type -a ag
:
ag is aliased to `apt-get update;apt-get dist-upgrade'
After uninstallation, I found that if I do sudo ag
, the command would correctly fail due to command not found; however, if I simply do a ag
as user, I was still able to run the command ( although the command actually failed due to lack of permission, i.e., it has to be run with sudo
every single time).
I've looked at places like /usr/bin/
, /usr/local/bin
, /usr/sbin/
, /usr/local/sbin
, sbin/
, bin/
, the ag
command didn't reside in any of them.
whereis
, locate
returned no matching results.
I've also tried
sudo apt purge silversearcher-ag
sudo apt purge silversearcher-ag*
The first command actually removed some additional affliations, the second simply removed none. After these two commands the ag
was still there.
What do I need to do to completely remove this package?
I am running MX Linux 23-ahs, based on Debian 12 bookworm.
apt
aliases? or where doesapt
store all its aliases on system?grep 'apt-get update;apt-get dist-upgrade' ~/.bashrc
or, if it isn't in~/.bashrc
trygrep 'apt-get update;apt-get dist-upgrade' ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/ /etc/environment 2> /dev/null
it should be in one of those./etc/bash.bashrc
; which to my knowledge very peculiar. I almost never touch that file. Anyway, we know what caused this now!