Lean and Clean: System Maintenance for TUXEDO OS - TUXEDO Computers

  ATTENTION: To use our store you have to activate JavaScript and deactivate script blockers!  
Thank you for your understanding!

Lean and Clean: System Maintenance for TUXEDO OS

In the past, many computer users have had the experience of having to clean up the system every now and then to prevent the computer from becoming slower and slower. Typical was cleaning the Windows registry database with one of the numerous registry cleaners, which were supposed to remove unused and thus unnecessary entries from the database. But the usefulness of such programs is controversial. Microsoft itself advises against the use of these tools, which did not diminish the popularity of applications like CCleaner and Co.

Install and remove applications

You usually install software under TUXEDO OS via the Discover package management. You can find the icon to call the program in the panel next to the start menu or in the menu under Applications » System. The package manager manages not only system-related packages, but a whole universe of free software. From the Firefox browser, to the image editor Gimp or the virtualization tool VirtualBox. If you install a program via the package management, then you can also remove it from the system later without leaving any residue via the package management.

Hidden files in personal home directory

The system treats the data and user-specific settings created by applications - including your own files - somewhat differently. These always remain untouched by the package management, even if you uninstall the associated application. For example, if you uninstall Gimp, the images you edited and the configuration files created by Gimp are preserved. If you install the application on your system again, you will find the program again with all the settings you have made.

All your personal settings can be found in the form of hidden files and folders in the home directory of the user you created. In the Dolphin file manager, you can display this data under the Open menu entry by activating the Show hidden files option via the bar icon at the top right of the window or by pressing the Ctrl+H key combination. In the terminal, extend commands such as ls or ll with the -a switch to also see the hidden files and folders.

Usually, applications store their settings in the subfolders .config (personal configurations), .local/share (personal data) and .cache (temporary files). In addition, most text editors save a copy of the original state of the edited file with an appended tilde, for example, example.txt~ (here .bashrc~).

This is the theory, but not all programs – especially older applications or large software packages like Firefox (.mozilla) or Blender (.blender), for example – adhere to these defaults. Therefore, you will find numerous other hidden files and folders in the home directory. As a rule, however, the names can be relatively easily assigned to the associated applications.

Directory Function
~/.config Configurations and settings
~/.cache Temporary files
~/.local/share Data and personnel files

TIP: If an application goes on strike because you have made a setting that the program does not like or that leads to an error and even a crash, then it usually does not help to delete the program via the package management and to reinstall it. The problematic settings – in the form of configuration files in the home directory – remain untouched. Instead, you should delete the hidden folder created by the program along with its contents and rename it on a test basis so that the program creates a new configuration.

Data from server applications and system programs

The situation is somewhat different for system-related applications or services, such as the SSH server or the Samba service for file sharing in the network. Here, the data is typically stored in directories that cannot be edited by the user himself. This prevents potentially malicious programs or even attackers from manipulating or even stealing important data.

Most Linux distributions and thus also TUXEDO OS adhere to the Filesystem Hierarchy Standard. This specifies a series of directories in which the system organizes program files, libraries, and data. Typical would be /bin for the basic system programs, /dev for special device files or /home for the data of the users created in the system.

You should avoid editing or deleting files manually in these directories. The package manager usually controls the contents of these directories automatically. If you uninstall a program, it deletes the files in /bin, /lib without your personal intervention, after all, the package manager knows which files it copies where when installing a package. If you interfere here, then the package management stumbles over inconsistencies.

Directory Function
/etc Host-specific system configuration
/opt Additional application programs
/usr/local Distribution-independent local hierarchy
/var Variable data

Example: Uninstalling the Samba service

When installing the Samba service for sharing directories on the network (via sudo apt install samba), the system automatically creates the smb.conf configuration file required for the service in the /etc/samba directory. However, if you now look at the affiliation to a package, the smb.conf is not assigned to any package. If you simply uninstall Samba (via apt remove samba samba-common), the file will remain unchanged.

ll /etc/samba/smb.conf
insgesamt 36
-rw-r--r--   1 root root  8950 Mär 29 09:22 smb.conf
dpkg-query -S /etc/samba/smb.conf
dpkg-query: no path found matching pattern /etc/samba/smb.conf
sudo apt remove samba samba-common
ll /etc/samba/smb.conf 
-rw-r--r-- 1 root root 8950 Mär 29 09:22 /etc/samba/smb.conf

Something similar happens when you uninstall databases or other system-related services: The data of the services, their settings, and configurations remain. To delete this data as well, you must uninstall the associated packages with the additional –purge switch or the purge option. In this case, the package management will delete not only the program files, but all data associated with the package. Note that this is done without any queries!

apt remove --purge samba samba-common
apt purge samba samba-common
[...]
Purging configuration files for samba-common (2:4.15.13+dfsg-0ubuntu1) ...
Purging configuration files for samba (2:4.15.13+dfsg-0ubuntu1) ...
[...]

Bleachbit and Stacer: system maintenance tools

In the Discover software management of TUXEDO OS, you will find Bleachbit and Stacer, two popular applications for cleaning up and optimizing the system. Both programs support the user in deleting possibly unnecessary data from the system. Stacer also offers a number of other functions, such as an overview of the current system state and running programs, an option to uninstall packages or applications, or to control services.

OPINION: Even though both applications are constantly being developed further, we recommend the use of optimization tools only for valid reasons. Usually, the system itself takes care of order and, for example, archives log files only for a certain time or until a certain amount of data is reached. The log of Journald, for example, occupies a maximum of 10 percent of the capacity of the system partition or a maximum of 4 GByte in the default configuration of TUXEDO OS – to be controlled via journalctl -b -u systemd-journald.

If you delete cache files, the system has to create them again and again. For example, the thumbnails in the file manager. This costs computing time and battery life in mobile use. In addition, the process takes a bit of time for larger image collections. As long as the shoe is not on the other foot and you have enough memory on your computer, you should trust the system mechanisms and not optimize the system yourself.