When you uninstall an application from Linux, make sure you're doing it in such a way as to remove both configuration files and dependencies.
If you're using Ubuntu or any other Debian-based distribution in your data centers, on-premises servers, or desktops, you've probably run into an instance where you needed to uninstall a piece of software. So you log in and run the command: sudo apt-get remove packagename (where packagename is the actual name of the package to be removed).
However, doing that leaves behind a number of things, primarily dependencies and configuration files. These straggling apps and files not only take up space, but they could ("could" being the operative word) cause security issues. You don't want that. So what do you do?
SEE: Choosing your Windows 7 exit strategy: Four options (TechRepublic Premium)
With just two simple commands you can cleanly remove those packages. What are those commands? Let me demonstrate.
Say you've installed Wordpress on a server and want to cleanly remove it. To first uninstall Wordpress and remove all configuration files, issue the command:
sudo apt-get purge wordpress
Once this command completes, you can then remove all of the dependencies that were installed alongside Wordpress with the command:
sudo apt-get autoremove
When that final command finishes, Wordpress will have been removed, along with all of its configuration files and dependencies. If you need to remove an application from a Linux server or desktop, using these two simple commands is the way to go.
- How to become a software engineer: A cheat sheet (TechRepublic)
- 10 free alternatives to Microsoft Word and Excel (TechRepublic download)
- How to create snapshots on Linux with Timeshift (TechRepublic)
- How to modify systemd-boot on Linux (TechRepublic)
- How to configure Linux to use NTLM using CNTLM (TechRepublic)
- 5 best open source Linux server distributions (TechRepublic)
- GNOME and KDE work together on the Linux desktop (ZDNet)
- Microsoft Office 365 for business: Everything you need to know (ZDNet)
- The 10 most important iPhone apps of all time (Download.com)
- It takes work to keep your data private online. These apps can help (CNET)
- Must-read coverage: Programming languages and developer career resources (TechRepublic on Flipboard)