How to properly remove packages

6,445

That is the proper way, there is no better way available.

Files created into your home dir, or other files created during normal package working, as i.e. log files, do not get removed, and there is no easy way to do so, if the preremove and postremove script do not do so themself. Obviously the problem is not in the removing, but in the individuation of such files.

The fact that the service you talk about keep on starting on boot is strange, it is perhaps present in another package? What dpkg -l | grep nginx returns?

Share:
6,445

Related videos on Youtube

urok93
Author by

urok93

Updated on September 18, 2022

Comments

  • urok93
    urok93 almost 2 years

    I would like to uninstall some packages, but I find that after I run the sudo apt-get remove <package-name> command I still have log files or other types of files running around. Is there a way I can just remove everything associated? I even had nginx installed and after I removed it I found that the process was still starting on reboot :S Am I doing something wrong? I've used the --purge parameter too and autoremove, but I am still finding folders and files belonging to packages I had uninstalled.

  • jrhorn424
    jrhorn424 almost 11 years
    Sometimes --purge doesn't work as I would expect. It's probably a good idea to run dpkg -S $(which PROGRAM) where program is the binary you're trying to uninstall. That'll tell you what packages to aptitude remove.