So I'm fairly new to Linux as my general desktop OS. I've removed and purged some programs that I tried and ended up not liking. I noticed there was a few files left over for some of these programs (psensor being one) in a few directories:

  • /usr/share/doc
  • /usr/share/doc-base
  • /usr/share/locale/(two letters)/LC_MESSAGES
  • /var/lib/dpkg/info
  • /var/lib/app-info/icons/ubuntu-focal-universe

Is it safe to remove the files in all/any of these directories? My intution says yes for the documentation is /doc, but I am unsure about the rest.


Edit: /usr/share/snmp/mibs is another directory

  • Please be specific with details, what OS & release are you using? When you removed the packages, did you apt remove, or apt purge? and if you used remove why not purge? Did you apt autoremove to clean up? Did you check the files you mention aren't related to any other package? I note you have mentioned focal but it's best if you're clear & precise.
    – guiverc
    Commented Feb 11, 2021 at 1:47
  • @guiverc Im on Ubuntu 20.04.2 LTS, i used apt remove purge. I used autoremove and that pretty much cleaned up everything except for the file in usr/share/snmp/mibs. The file in question seems to not be related to anything else. The file is LM-SENSORS-MIB.txt from the lm-sensors package installed via apt.
    – Abdul
    Commented Feb 11, 2021 at 5:50
  • re: "seems to not be related"; I was thinking of for example dpkg -S /usr/share/snmp/mibs/LM-SENSORS-MIB.txt on my system tells me that file was put there by libsnmp-base package. It won't explain every file, as some maybe created/setup/copied by a post-installation script (which dpkg -S won't have in it's database, eg. install install maybe put /usr/share/... that are copied later to the user's directory via post-install script, or on a user's [first] login if the file isn't detected at login)...
    – guiverc
    Commented Feb 11, 2021 at 6:45
  • @guiverc Ran the same command and got the same response - I checked the file props and found that it was last modified a few days before I even installed lm-sensors, so probably a good idea to just leave it there. Thanks for the help!
    – Abdul
    Commented Feb 11, 2021 at 7:02

1 Answer 1


Synaptic Package Manager (synaptic) has a feature for safely removing residual configuration files. In Synaptic select the Status category in the lower left corner and select Not installed (residual config) in the upper left corner. Click a package to remove the residual configuration files and select Mark for Complete Removal. After you have finished marking the selected package(s) for complete removal, apply the changes by clicking the Apply button, which is the third button from the left in the Synaptic toolbar.

enter image description here

You can install Synaptic alongside Ubuntu Software without either package manager interfering with the other one. To install Synaptic in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install synaptic

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .