The following is an introduction to the method of forcefully deleting software packages in Debian. If your software cannot be removed using the built-in uninstaller, you can use the command introduced in this article to forcefully uninstall it.
Some packages may not be uninstalled normally due to dependency issues, prompting a bunch of errors. You can force uninstall at this time.
The database of the apt package manager is located in the /var/lib/dpkg directory. Assume that the name of the package that needs to be forcibly uninstalled is foo, execute the following command:
# cd /var/lib/dpkg/info
#rm foo.*
# aptitude purge foo (Maybe # dpkg purge foo will also work, haven’t tried it yet)
The files to which the package belongs can be deleted directly from the hard drive