Cleaning Linux Systems

Outside the enterprise, virus and malware scanning tools usually are not needed in Linux systems. One reason is software is installed through trusted package management systems. On all Linux distros the trust level of package repositories is always high. Once in a blue moon a related issue is discovered with a repository, but the problem is published and remedied in a timely manner.

A concern with installing software outside the repository system is malware. The only way to avoid malware is due diligence with research and looking for reports around the web.

Unlike Windows, generally keeping a system “cleaned” of temporary or junk files is not a steep hill to climb with Linux systems. There are some basic tricks that can be used without fancy tools.

One way disk storage space dwindles is with caching directories. Generally, files stored in a cache directory are useful to improve system or desktop performance, but those files can be deleted without penalty.

For individual users a common location for such files is $HOME/.cache. Files deleted from this directory will be regenerated as needed by individual software programs.

All Linux distros use packages to install software. Those packages are downloaded and often stored on the local hard disk. Those packages can occupy notable storage space. Many people disable package caching to prevent packages from being stored on a system after being installed.

Many files are temporary in nature. There are two types of temporary files, persistent and non persistent. Persistent means surviving a reboot or power down. Persistent temporary files commonly are stored in /var/tmp. Despite being defined as being persistent, such files can be deleted without penalty because they are also considered temporary.

Non persistent temporary files usually are stored in /tmp. Common practice these days is to mount /tmp using tmpfs, which is a file system in RAM. Because the storage location is RAM, on reboot or power down all files stored in any tmpfs directory will be deleted automatically.

If these steps seem insufficient there are dedicated tools such as bleachbit. Use such tools conservatively. Aggressive system cleaning often means breakage.

Posted: Category: Tutorial Tagged: General

Next: Disk Imaging

Previous: Living with Laptops