-1

Ubuntu 22.04.

It seems simple, but I haven't found an answer on the internet. I uninstalled 2 programs:

sudo apt purge chrome-browser
sudo apt purge gkellm

Then i used sudo apt autoremove. But after I installed chrome and gkellm again, I saw that all the settings, cache and other program files were still there. So in chrome the cache, cookies and open tabs were preserved. In gkellm all the settings I used were saved. How can I uninstall a program completely, including its configuration, cache and other files?

How do I clear the system of such files if I don't remember the package name? I have installed and uninstalled many programs and each one left garbage in my computer.

2 Answers2

1

Try this:

At $ type man apt hit Enter then type /purge and hit Enter again.

you will see...

Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident. Just issuing an installation request for the accidentally removed package will restore its function as before in that case. On the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration stored in your home directory.

Hannu
  • 6,605
  • 1
  • 28
  • 45
1

When installing applications, system configuration files can be installed. Whenever you run a program for the first time, local user configuration files are created.

  • System configuration files are not removed when you apt remove an application. However, apt purge will not only remove the program files, but also the system configuration installed with that program. (The apt-purge command also can be used for already removed packages).

  • local user configuration is never automatically removed.

Thus, in order to delete your cache, cookies and settings, you need to manually remove the user configuration data left in your home folder. This user configuration data lives under hidden folders, or in hidden files in your user home directory.

  • Hidden files and folders have a file name that begins with a dot (.)

  • To show hidden files in the file manager, select the appropriate option. In many file managers, you can also hit Ctrl+H to toggle the display of hidden files.

In particular, configuration data commonly is stored under the folder .config in your home directory (~/.config). For example, user configuration data for Chrome is stored in ~/.config/google-chrome. Very commonly, applications store configuration data in their own hidden folder, e.g. ~/.dropbox or .mozilla.

vanadium
  • 97,564