How To Clean Centos 7 With Terminal
Introduction
Uncesscerary packages dull downward organisation performance and take up storage space. If specific software isn't being used, so it's best to remove it, and doing so is easy.
In this tutorial, learn how to remove packages and uninstall dependencies from CentOS seven.

Prerequisites
- Admission to a user account with sudo or root privileges
- A terminal window or command line (Ctrl+Alt+F2)
- The YUM and RPM package managers, included past default
Uninstall Package from CentOS with Yum
CentOS is an RHEL (Crimson Hat Enterprise Linux) distribution. Users rely on the RPM (Cherry-chapeau Package Director) and YUM (The Yellowdog Updater, Modified) packet manager.
To remove a packet from CentOS, utilize the post-obit yum commands:
yum remove [package_name]
OR
yum erase [package_name]
In the post-obit example, nosotros deleted the Apache web server package, filed under the proper noun httpd.x86_64, using the yum
command.
Earlier removing, the control prompt asks for the root (or sudo user) password, and confirmation that you lot want the software deleted.
Blazon in y (for yes) and press Enter. If you accept changed your mind, press n (for no) and and so Enter.
Finally, the output informs y'all that the process is complete and shows you lot which package has been deleted.

Note: Just root users and users added to the sudousers group take permission to install and remove packages in CentOS.
How to Remove Packages with Dependencies Using Yum
Package dependencies are binaries, libraries, and modules on which software rely on. When installing software, it will automatically download and shop the required dependencies.
In most cases, deleting software from the local package director volition also erase its dependencies (unless other programs crave them).
Still, there are instances in which these dependencies have to be removed manually.
To remove a packet and erase all the unneeded dependencies apply the following command:
yum autoremove [package_name]
Alternatively, yous tin can alter the yum configuration file to automatically remove package dependencies when deleting a packet with the yum remove
or yum erase
commands.
Start by opening the yum.conf file with a text editor of your choice:
half dozen /etc/yum.conf
Then, add together the following line to the file:
directive clean_requirements_on_remove=1

Relieve and exit the file.
How to Find Specific File in CentOS
In case you demand to delete a package but are unsure of its exact file name, y'all can use one of the post-obit two commands:
yum list- | grep [package_name]
OR
rpm -qa | grep [package_name]
The output will list all installed packages with the specified phrase found in the file name.
As you lot can meet in the prototype beneath, httpd appears in the following packages (and dependencies):

Subsequently you have the exact name of the bundle yous want to erase, y'all tin uninstall it from your CentOS system.
For more options on listing packages on CentOS read our detailed tutorial.
Conclusion
After reading this tutorial, you should now know how to remove packages and dependencies to free up space taken up by redundant programs.
You also know how chop-chop find specific packages or files you desire to delete.
Was this commodity helpful?
Yes No
How To Clean Centos 7 With Terminal,
Source: https://phoenixnap.com/kb/centos-uninstall-remove-package
Posted by: hubbardtheigners.blogspot.com
0 Response to "How To Clean Centos 7 With Terminal"
Post a Comment