When you install an application on Linux using a .deb
file and later need to uninstall it without the .deb
file, the process can be a bit tricky. Here’s a comprehensive guide based on our experience to help you through the uninstallation process.
Steps to Uninstall the Application
- List Installed Packages: Start by listing all installed packages to locate the one you need to remove.
dpkg --list
- Search for the Package: If you know part of the app’s name, use the
grep
command to narrow down the list.dpkg --list | grep [app_name]
- Uninstall the Package: Once you identify the package name, you can remove it using the following command:
To remove configuration files as well, use:sudo apt remove [package_name]
sudo apt purge [package_name]
- Remove Unused Dependencies: Optionally, you can clean up any unnecessary dependencies.
sudo apt autoremove
Troubleshooting
- Using Synaptic Package Manager: If the package name search doesn't yield results, you can use a graphical package manager like Synaptic.
Search for the application in Synaptic and uninstall it from there.sudo apt install synaptic sudo synaptic
- Checking Desktop Entries: Sometimes the package name might not be obvious. You can check for
.desktop
files in the applications directories.grep -i "[app_name]" /usr/share/applications/*.desktop grep -i "[app_name]" ~/.local/share/applications/*.desktop
- Finding Executable Files: You can also search for the executable files directly.
sudo find / -iname "*[app_name]*"
- Searching User Directory: If you have permission issues or want to search only within your home directory, you can use:
find ~/ -name "*[app_name]*"
When the App is a Windows Application
If after all these steps you realize that the app was actually a Windows application mistakenly thought to be a .deb
file, here’s how to proceed:
- Using Wine Uninstaller: Open Wine’s uninstaller to remove the application.
This opens a GUI similar to Windows' Add/Remove Programs. Find the application and remove it from there.wine uninstaller
- Manual Removal:
- Navigate to the Wine Directory:
cd ~/.wine/drive_c/Program\ Files/ (or Program Files (x86) for 32-bit applications)
- Delete the Application Folder:
rm -rf "[app_name]"
- Navigate to the Wine Directory:
- Clean Up Registry Entries: Optionally, remove any registry entries related to the app.
Search for entries related to the app and delete them.nano ~/.wine/system.reg
Example: Uninstalling "FULLSTACK"
Let's use an app named "FULLSTACK" as our example and apply it to each step.
Steps to Uninstall "FULLSTACK"
- List Installed Packages: Start by listing all installed packages to locate "FULLSTACK".
dpkg --list
- Search for the Package: Use the
grep
command to narrow down the list.dpkg --list | grep fullstack
- Uninstall the Package: Once you identify the package name, you can remove it using:
To remove configuration files as well, use:sudo apt remove fullstack
sudo apt purge fullstack
- Remove Unused Dependencies: Optionally, you can clean up any unnecessary dependencies.
sudo apt autoremove
Troubleshooting for "FULLSTACK"
- Using Synaptic Package Manager: If the package name search doesn't yield results, use Synaptic.
Search for "FULLSTACK" in Synaptic and uninstall it from there.sudo apt install synaptic sudo synaptic
- Checking Desktop Entries: Check for
.desktop
files in the applications directories.grep -i "fullstack" /usr/share/applications/*.desktop grep -i "fullstack" ~/.local/share/applications/*.desktop
- Finding Executable Files: Search for the executable files directly.
sudo find / -iname "*fullstack*"
- Searching User Directory: If you have permission issues or want to search only within your home directory:
find ~/ -name "*fullstack*"
When "FULLSTACK" is a Windows Application
If "FULLSTACK" is actually a Windows application:
- Using Wine Uninstaller: Open Wine’s uninstaller to remove "FULLSTACK".
wine uninstaller
- Manual Removal:
- Navigate to the Wine Directory:
cd ~/.wine/drive_c/Program\ Files/ (or Program Files (x86) for 32-bit applications)
- Delete the Application Folder:
rm -rf "FULLSTACK"
- Navigate to the Wine Directory:
- Clean Up Registry Entries: Optionally, remove any registry entries related to "FULLSTACK".
Search for entries related to "FULLSTACK" and delete them.nano ~/.wine/system.reg
Removing Lingering Icons from the App Panel
If you have uninstalled an application but its icon is still visible in the app panel, follow these steps to remove any leftover .desktop files and clear the system cache to get rid of the lingering icon.
Remove .desktop Files
- Open Terminal: Press
Ctrl+Alt+T
. - Search for .desktop Files: Run the following command to search for .desktop files related to the app:
sudo find / -name "*fullstack*.desktop"
- Delete the .desktop File: Once you find the .desktop file, delete it. For example:
sudo rm /usr/share/applications/fullstack.desktop sudo rm ~/.local/share/applications/fullstack.desktop
Clear System Cache
- Clear Icon Cache: Run the following command to clear the system icon cache:
sudo gtk-update-icon-cache /usr/share/icons/hicolor
- Reboot System: Restart your computer to ensure all changes take effect:
sudo reboot
Finally ! The File Manager Sudo Approach to delete app icons
If you've uninstalled an application in Ubuntu but still see its icon lingering in your app tray, here's a handy file explorer approach to clean it up using the Nautilus file manager:
- Open a terminal and type:
This will open the file manager with root permissions.sudo nautilus
- Navigate to the filesystem root folder.
- Search for the uninstalled app's name, package name, or identifier (eg. FULLSTACK) . This might take a few minutes.
- Once you locate the relevant files, you should find:
- .menu
- .Ink
- .desktop files
- Delete these files to remove the unwanted icons.
Hurray! Now your app tray is clutter-free.
Conclusion
Uninstalling a Linux package installed via a .deb
file can sometimes be challenging, especially when you no longer have the .deb
file. This guide has provided a comprehensive set of steps and troubleshooting methods to help you remove such applications effectively. From listing and searching installed packages to using graphical tools like Synaptic, and even dealing with mistaken Windows applications, we’ve covered a wide range of scenarios.
Using the example of "FULLSTACK," we demonstrated how to apply these methods in practice, ensuring that you have the tools and knowledge needed to tackle similar issues in the future. Additionally, we provided steps to remove lingering icons from the app panel, ensuring a thorough clean-up of any residual files.
We hope this guide has been helpful. If you have any further questions or need more assistance, feel free to reach out. Remember, the world of Linux offers a lot of flexibility and control, and with the right approach, you can manage your system efficiently.
Leave a Reply