« Previous 1 2
Cleaning up your Linux server
Housekeeping
Package Cleanup
Package managers are great because it frees admins from having to spend hours resolving dependencies for software packages. However, these same package systems tend to clutter the filesystem with old packages, dependencies, and cached files no longer needed but that waste a lot of space.
To solve this problem on Debian-based systems, run the commands:
$ sudo apt-get autoclean $ sudo apt-get clean $ sudo apt-get autoremove
For Red Hat-based systems, the following command works:
$ sudo yum autoremove
You can also install the yum-utils package and then issue
$ package-cleanup --leaves --all
to remove RPM files.
Conclusion
System cleanup is an ongoing task that you should perform on a regular basis, which could depend on the number of system users, amount of system use, and disk space limitations. Some systems require weekly maintenance, whereas others can wait for quarterly maintenance windows. You might also want to investigate setting up filesystem quotas, especially on /home
, to ensure that users take some responsibility for their own housekeeping.
« Previous 1 2
Buy this article as PDF
(incl. VAT)