How to Remove Residual Files After Uninstalling Software on Linux

Linux has no Windows registry hell. For most users, this is a major benefit: an incredible, constantly-changing, central database that deserves attention. The disadvantage is that uninstalling software and utilities requires a useful installer utility or careful grooming of user files. Many programs do have uninstall routines or utilities, especially those installed through a package manager such as apt-get, but others need to manually delete the remaining files after uninstalling the software.

As long-time users of Linux know, there aren’t many “warning” operating system warnings about deleting files. All files on the hard drive are files of equal value. As a result, deleting a “program” is really just deleting a collection of files that work together. Ideally, uninstalling programs will solve these problems for you, but not every program is well managed.

Uninstall a program using the package manager

Whenever possible, remove the application package using the package manager you used to install the application. For example, if you installed the application in Ubuntu software or Gnome software, you can uninstall the software from the same location.

You can also view the INSTALL or README files of the installed packages. You can find them through the main binary of the package.

Using synapses

Synaptic is a GUI package manager for Debian-based Linux applications. It has a more powerful removal tool than the default package management application.

Install Synaptic via Ubuntu software or apt-get:

sudo apt-get install synaptic

After the installation is complete, launch Synaptic to see all installed packages. It marks the currently installed package as a green square. You can also filter installed applications using only the sidebar.

To completely remove an application, right-click on its installed package and select “Mark for Complete Removal” from the context menu.

This will mark the file for deletion. To delete a file, click Apply or press Ctrl + P on your keyboard.

Remove Linux Program Synaptic Apply Remove Completely

Use apt-get

If you use apt-get,use apt-get. This will include the same packages as in Synaptic. But given the possibility of a slight difference between apt-get and Synaptic, you may want to use a package manager with that package installed to remove your software. This will always ensure complete removal.

To remove the software package and all related files from the system, execute the following command:

sudo apt-get purge package-name

Replace package-name And the name of the package you want to remove. In our example, we will remove wireshark.

Remove Linux Program Apt Get Purge 1 Completely

Once the package is found, type “Y” and press “Enter” to confirm that the package has been removed.

Remove Linux Program Apt Get Purge 2 Completely

To use purge The command deletes the application and its configuration files. However, it does not remove the application’s dependencies. To remove all dependencies that were downloaded automatically with the original package, run the following command:

sudo apt-get autoremove

This will remove all unnecessary dependencies, including any orphans that were orphaned by deleting their parent package.

Use yum-remove

Uninstall linux yum remove

If your Linux distribution uses yum instead of apt-get, use the following command:

sudo yum remove package-name

Again, replace package-name And the name of the package you want to remove. To uninstall multiple packages, list them after the remove command.

sudo yum remove wireshark tmux unzip

If you installed packages using yum’s groups feature, you need to remove them as a group.

sudo yum remove @"Group Name"

Replace with the appropriate group name to delete all repositories associated with the group. The @ sign specifies a group, and quotes are used to capture spaces in the group name. If the name has no spaces, the quotes are not required.

Delete user profile manually

After uninstalling, you may need to manually scan for user configuration and residual files in the following directories:

  • ~ /
  • / usr / bin
  • / usr / lib
  • / usr / local
  • / usr / share / man
  • / usr / share / doc
  • / var
  • /run
  • / lib
  • ~ /. Caching
  • ~ / .Local
  • ~ / .Local / share
  • ~ /. Thumbnail
  • ~ / .Config /

note: ~/ Means Home folder, “~ / .local” is a hidden folder (named .local) in the Home folder. You will need to press Ctrl + H to view hidden files / folders in the file manager.

User profiles are usually stored in their application-specific folders, so you can easily find them by the name of their folder.

Linux local shared folder

You also need to find the package-specific files that share the package name. For example, KDE uses “~ / .kde” to store user profiles.

in conclusion

The best and easiest way to delete an application on Linux is to use a package manager that installs the application. Since the package manager has the vast majority of software installed on most Linux platforms, simply removing it with the package manager can solve a variety of situations. However, in most cases, your user profile will remain the same in the Home folder, so it is best to go through the “~ / .local” folder to ensure that all residual files are removed.

Ranch
                        
                    
                    Ranch

Sidebar