how can I clear complete package traces in ubuntu devices? I am trying to uninstall a package from golang binary. After uninstall when I do dpkg -l /apt-cache still I am getting package name and configuration files information. Is it possible to remove those traces or uninstall the package using shell script by running script from package maintainer scripts?
Asked
Active
Viewed 3,778 times
-3
-
2`dpkg -l` queries the dpkg *database*, which includes all known packages, including all uninstalled packages. It's *supposed* to keep track of uninstalled packages. – user535733 Apr 02 '20 at 17:43
-
I know that please read the question once for a better understanding. – Somesh Apr 02 '20 at 17:46
-
Did you *remove* the package(s) or *purge* them? the former doesn't remove configuration files (so for example `dpkg -l` may show something like `rc`) – steeldriver Apr 02 '20 at 17:46
-
1yes it is showing pc and it was not existing that state. When I run again manually dpkg -P
command from terminal then traces are clearing. – Somesh Apr 02 '20 at 17:48
1 Answers
0
Looks like you used remove, which leaves the config files in place.
If you use purge, it will also remove the config files.
Neither option will remove data or config files in your /home. You must remove those manually, if any.
user535733
- 58,040
- 10
- 106
- 136
-
No from the begging I doing purging only. Manually it was working fine. – Somesh Apr 02 '20 at 17:58
-
Show us the complete output of a `purge` that fails to remove config files. [Add it to your question](https://askubuntu.com/posts/1223558/edit) above. – user535733 Apr 02 '20 at 18:03
-
I have implemented one application to uninstall the application based on cloud messages, in that case, I am getting this issue otherwise purging is working fine. So, I can not get that output. – Somesh Apr 02 '20 at 18:09
-
That is important information that should be in your original question above. Seems like you have a bug in that cloud application. – user535733 Apr 02 '20 at 18:57