Tag: software errors / problem solutions

Errors “Incorrect definition of table mysql.event: expected column ‘definer’ at position 3 to have type varchar(, found type char(141)” and “Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler” (SOLVED)

When upgrading mariadb to version 10.8.3, the following messages were shown:

warning: directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/
filesystem: 700  package: 755
:: MariaDB was updated to a new feature release. To update the data run:
   systemctl restart mariadb.service && mariadb-upgrade -u root -p

They contain information about two events that require the action of a system administrator or user.

The second one is more important, it says that to update the data, you need to run the specified commands.

An error occurred when initializing system tables. Disabling the Event Scheduler (SOLVED)

First, restart the DBMS service and check its status:

sudo systemctl restart mariadb.service
systemctl status mariadb.service

Sample output:

● mariadb.service - MariaDB 10.8.3 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-06-01 03:40:27 MSK; 34s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 1271213 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 1271214 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
    Process: 1271261 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
   Main PID: 1271247 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 14 (limit: 4690)
     Memory: 187.7M
        CPU: 788ms
     CGroup: /system.slice/mariadb.service
             └─1271247 /usr/bin/mariadbd

Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: log sequence number 38052502275; transaction id 74463190
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] Server socket created on IP: '127.0.0.1'.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] /usr/bin/mariadbd: ready for connections.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: Version: '10.8.3-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Arch Linux
Jun 01 03:40:27 suip.biz systemd[1]: Started MariaDB 10.8.3 database server.
Jun 01 03:40:27 suip.biz mariadbd[1271247]: 2022-06-01  3:40:27 0 [Note] InnoDB: Buffer pool(s) load completed at 220601  3:40:27

On the one hand, the service is up and running. However, there are a few error messages as well as a few warnings. Most important messages:

[ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
[ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.

Action must be taken to fix errors.

To do this, run a database update:

sudo mariadb-upgrade -u root -p

You will need to enter the password of the DBMS root user and wait for the command to complete.

Then restart the service again and check its status:

sudo systemctl restart mariadb.service
systemctl status mariadb.service

As you can see, there are no errors.

directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/ filesystem: 700 package: 755 (SOLVED)

Now let's look at the second message:

warning: directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/
filesystem: 700 package: 755

This is not an error, but a warning. The bottom line is that the permission on the /usr/lib/mysql/plugin/auth_pam_tool_dir/ directory differs between the actual value in the file system and the one specified in the installation package.

The most likely reasons for this are:

  • in the previous version of the package, different permissions were specified for the directory, and then the package maintainers decided to change them for one reason or another
  • you yourself changed the permissions to the specified directory

To bring the value of permissions to those recommended in the installation package, start by checking the current value:

sudo ls -dl /usr/lib/mysql/plugin/auth_pam_tool_dir/

Then run the chmod command with the desired permissions:

sudo chmod 755 /usr/lib/mysql/plugin/auth_pam_tool_dir/

Check your permissions again:

sudo ls -dl /usr/lib/mysql/plugin/auth_pam_tool_dir/

As you can see in the following screenshot, the permissions to the specified directory have been changed:

Why doesn’t Linux with Persistence keep settings after reboot? (SOLVED)

Persistence is a partition on a flash drive with a Live Linux system, thanks to which the programs and settings installed on the system are saved.

A live image with a Linux distribution can be written to a USB flash drive. The result is a bootable USB flash drive with Linux. That is, you can boot into Linux and use the programs and tools of this operating system. A feature of the Live image is that you can install programs, save files and make other changes and settings in the operating system. All settings are stored in the virtual file system. That is, within one session, work in the Live system does not differ from work in any other Linux. But immediately after reboot, all changes made will be lost and the system will return to its initial state.

In order for files and changes in the OS to be saved between reboots, you can create a Persistence partition, in which all changes will be stored. For an example of how to create a bootable USB with Persistence, see “How to make Kali Linux 2022 Live USB with Persistence and optional encryption (on Windows)”.

After creating Persistence, all changes should be “remembered” and be visible after a reboot. But some users are faced with the fact that even after creating a persistent storage, files and installed programs disappear after a reboot. What could be the problem?

The fact is that even after creating the Persistence volume, the user still has several boot options, for example:

  • Live system – OS boot without using persistent storage
  • Live USB Persistence – OS boot using persistent storage
  • Live USB Encrypted Persistence – OS boot using encrypted persistent storage

As you might guess, if you select “Live system” from the boot menu, then your system will be a regular Live system that does not use Persistence. In this case, the Live system option is the first item in the boot menu, that is, it will be used by default if no other option is selected.

Thus, to see the changes made before rebooting Linux, select one of the following options from the boot menu:

  • Live USB Persistence
  • Live USB Encrypted Persistence

“Failed - Network error” when exporting from phpMyAdmin (SOLVED)

phpMyAdmin allows ones to export databases and individual tables (as well as individual rows) in the web interface.

In the latest stable version of phpMyAdmin 5.1.3, users encountered a problem when exporting data from tables and databases to a file.

Regardless of the selected settings, instead of downloading the file, an error is shown:

Failed - Network error

This is what the error looks like in a web browser:

This bug has been fixed in phpMyAdmin 5.3, which is available as a snapshot version at the time of writing.

You can download phpMyAdmin 5.3 from the direct link: https://files.phpmyadmin.net/snapshots/phpMyAdmin-5.3+snapshot-all-languages.zip

Or go to the download page of the phpMyAdmin site and select the latest version there: https://www.phpmyadmin.net/downloads/

After unpacking phpMyAdmin in the web server folder, no additional configuration is required - the export of databases and tables works again.

“Error: failed to commit transaction (invalid or corrupted package)” (SOLVED)

When updating or installing packages in Arch Linux, Manjaro and their derivatives, you may encounter the “error: failed to commit transaction (invalid or corrupted package). Errors occurred, no packages were upgraded.” issue.

Full error log:

:: Retrieving packages...
 libinih-55-2-x86_64                                15.4 KiB   385 KiB/s 00:00 [############################################] 100%
(40/40) checking keys in keyring                                               [############################################] 100%
(40/40) checking package integrity                                             [############################################] 100%
error: libinih: signature from "Maxime Gauduin <alucryd@gmail.com>" is marginal trust
:: File /var/cache/pacman/pkg/libinih-55-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

In this case, the error occurs when trying to update the libinih package, but it can occur for other packages as well.

First, try delete the package, as recommended, and run the update again to download the installation package file. This will resolve the issue if the error is caused by a corrupted package, such as a network outage.

If this does not help, then instead of a complete update of the system, run the update of the archlinux-keyring package:

sudo pacman -Sy archlinux-keyring

This should fix the PGP signature verification issue.

This error and the problem with incorrect PGP signature can occur on systems that are rarely updated (updated with long breaks). The error lies in the fact that packages with “invalid” PGP signatures are signed with keys that are contained in the updated version of the archlinux-keyring package. Therefore, by starting with updating archlinux-keyring you get new versions of the keys, which then successfully verify the PGP signatures of the package files.

What happens if an IPv4 client tries to access an IPv6-only server (SOLVED)

Question:

Hey! The article says that IPv6 is a completely different protocol, I had a question. If my recipient's email works only on IPv6 (that is, his mail server listens only through the IPv6 protocol), does this mean that when sending a letter from a mail server that is connected only to IPv4, the letter simply will not reach the recipient, that is, I will have to choose some kind of mail service whose mail server works with both IPv6 and IPv4 so that my friend can read my letter?

Answer:

The considered situation, when one server has only an IPv4 address, and the second server has only an IPv6 address, is purely theoretical. ISPs that use IPv6 and provide IPv6 addresses to customers also provide IPv4 addresses at the same time.

For example, this router is connected to an ISP that supports IPv6. However, a router has two types of IP addresses:

  • 10.241.24.29
  • 2001:fb1:fc0:135:20e8:31d0:4821:6624

My computer is connected to this router, so it also has two types of IP addresses:

  • 192.168.1.58
  • 2001:fb1:139:20d8:82c0:cb25:b750:24d4

Note that IPv4 and IPv6 are such separate networks that for IPv6, the router has its own DNS server IP – 2001:fb0:100::207:49.

The same is true for hosting providers. For example, ISPs in my country do not support IPv6. But at the same time, hosting providers in my country have been supporting IPv6 for a very long time (for example, I set up IPv6 for SuIP.biz back in 2016, while one rented VPS server came with one free IPv4 and 3 free IPv6).

You can search for websites with IPv6 support and look at their DNS records – you will see that in addition to the AAAA record (IPv6 address of the site), there is also an A record for the site (IPv4 address of the site).

That is, yes, if one of the computers (client or server1) is connected only to an IPv4 network, and the second computer (server or server2) is connected only to an IPv6 network, then theoretically it is simply impossible to build a network route between them from the first to the second. But in practice, this problem does not arise simply for the reason that absolutely all clients and servers support IPv4, and some also support IPv6. That is, all possible combinations work according to one of the following options:

  • client and server support IPv6 – IPv6 is used
  • client supports IPv6 and server does not support IPv6 – IPv4 is used
  • client does not support IPv6 and server supports IPv6 – IPv4 is used
  • client does not support IPv6 and server does not support IPv6 – IPv4 is used

However, it is possible to isolate an IPv6-enabled server from an IPv4 network, which is what I talk about in the section “How to configure SSH to work with IPv6 only”.

In short: IPv4 and IPv6 are two different networks, even though they run on the same wires and on the same hardware.

If you're interested in a specific error, when you try to open an IPv6-only site from an IPv4-only client, you get the “Network is unreachable” error.

Another example of an error: if you try to run the following command from an IPv6-enabled network:

sudo nmap -6 suip.biz

then the host suip.biz will be scanned.

If you run the same command from a network without IPv6 support, an error will be displayed: “setup_target: failed to determine route to suip.biz (2a02:f680:1:1100::3d60)”.

See also detailed IPv6 guides:

Online services with IPv6 support:

Error “convert: cache resources exhausted” (SOLVED)

When using the convert utility to convert images, you may encounter an error stating that the cache resources have been exhausted.

Command example:

convert -density 300 -quality 100 input.pdf output.png

An example of the error it causes:

convert-im6.q16: cache resources exhausted `/tmp/magick-q7O_IcbbGpFULs5R34rLlwAyeW1slGHi19' @ error/cache.c/OpenPixelCache/4095.

This error occurs when two conditions are combined:

  • processing a large file (for example, when converting PDF to JPG)
  • weak computer with little RAM

As a quick fix, you can try reducing the image quality:

convert -density 150 -quality 70 input.pdf output.png

The -density option specifies the horizontal and vertical density of the image, that is, the number of dots. Typically, for scanning photographs, the setting is set to 300 dots – this is enough for good image quality for viewing on a monitor screen and for printing. You can experiment by choosing a lower value.

The -quality option specifies the compression level for JPEG/MIFF/PNG. Option value 100 means no compression, 100% image quality. An option value of 70 means 70% of the image quality by reducing its size.

If you do not want to reduce the quality, then you can try changing the settings. To do this, open the policy.xml file. Depending on your Linux distribution and version of ImageMagick, the path to the file may vary, for example:

  • /etc/ImageMagick-6/policy.xml
  • /etc/ImageMagick-7/policy.xml

Find and edit the string value:

<policy domain="resource" name="memory" value="256MiB"/>

Error “attempt to perform an operation not allowed by the security policy `PDF’” (SOLVED)

On Debian, Ubuntu, Linux Mint, Arch Linux, and derivative systems, when converting documents from PDF to PNG, an error occurs:

attempt to perform an operation not allowed by the security policy `PDF'

An example of a command that causes this error:

convert -density 300 -quality 100 PL48536179.pdf out.jpg
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/421.
convert-im6.q16: no images defined `out.jpg' @ error/convert.c/ConvertImageCommand/3229.

Apparently Imagemagick's security policy does not allow this conversion from pdf to png. Converting other formats seems to work, but not from pdf. This happens with the default imagemagick settings.

Two options for solving the problem:

1.

In the file /etc/ImageMagick-6/policy.xml before the line

</policymap>

insert the line:

  <policy domain="coder" rights="read | write" pattern="PDF" />

and everything will work.

Note: The path to the policy.xml file may differ depending on the version of ImageMagick, for example, the path may be: /etc/ImageMagick-7/policy.xml

2.

The second option is similar, you also need to open the file /etc/ImageMagick-6/policy.xml

Find uncommented lines there

  <policy domain="coder" rights="none" pattern="PS" />
  <policy domain="coder" rights="none" pattern="PS2" />
  <policy domain="coder" rights="none" pattern="PS3" />
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="XPS" />

And comment them out, that is, put <!-- in front of them, and --> at the end.

This should work for Debian, Ubuntu, Linux Mint, and derivative systems.

In Arch Linux open the file /etc/ImageMagick-7/policy.xml

Find the uncommented line there

<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />

And comment them out, that is, put <!-- in front of them, and --> at the end.

After that pdf conversion should work again.

No need to do two options at once – choose one of them. The first option will only allow conversion from PDF, the second option will allow conversion from all PS, PS2, PS3, EPS, PDF, XPS formats.

This PDF policy was added due to a bug in Ghostscript that has now been fixed. That is, if you are using the current version of Ghostscript, then this policy is no longer needed.

That is, don't forget to update your Ghostscript to the latest version!

What files can be deleted when there is not enough disk space in Linux

There are situations when the disk space has run out completely and you need to urgently clean the disk and delete files. Disk space may run out even so that

  • when trying to clear the installation package cache, the system will report an error (there is no place even to save the lock file),
  • when trying to install ncdu to search for overgrown folders and files, the system will not be able to find even the 81 kilobytes required for this command
  • when trying to find the files and folders that take up the most space in Linux, the system will also give an error due to the fact that the sort command will not be able to save the data cache to disk if there is a lot of this data

That is, there are really critical situations – in these conditions, many programs and services stop working normally. Therefore, the task becomes the following: urgently at any cost to free up disk space so that you can continue servicing the system and proceed to the second stage – searching for directories and files that led to this problem due to the fact that they began to take up too much space.

I will warn you in advance: the following commands, although they mainly delete useless files, after their execution can lead to the following consequences:

  • the services will need to be restarted for them to work properly (so that they re-create the log files, caches, lock files)
  • various logs and files from the recycle bin may be lost, which, although not needed by most users, in some conditions you may want to keep them (for example, it is important for you to examine the log files, as they may be the cause of the problem).

This means that DO NOT mindlessly copy commands – read the explanations for them and evaluate how painless they are for your situation.

1. Deleting temporary files

The files in the /tmp/ directory will be deleted anyway on the next system reboot. That is, on the one hand, they can be removed quite painlessly:

sudo rm -rf /tmp/*

BUT: programs that are currently running and that have saved some data to the /tmp/ directory may be broken.

2. Deleting cache files

The /var/cache/ directory has many subdirectories that can be deleted almost painlessly (data will not be lost, and programs will create new cache files). This directory is of particular interest because on some systems caches grow to gigabytes and tens of gigabytes. Sometimes looking for a problematic directory in /var/cache/ can finally solve a situation with a lack of disk space.

To remove the font cache:

sudo rm -rf /var/cache/fontconfig/

To remove the installation package cache (on Debian, Linux Mint, Ubuntu, Kali Linux and derivatives):

sudo rm -rf /var/cache/apt/

To remove the installation package cache (on Arch Linux, BlackArch and their derivatives):

sudo rm -rf /var/cache/pacman/

Deleting the man page cache:

sudo rm -rf /var/cache/man/

You can continue searching for large caches applicable to the software installed on your system. For example, these can be web server caches, proxy servers, etc.

3. Delete logs

In this directory (/var/log/) you can delete almost all files, but try to keep the folder structure, because some applications, after deleting a directory here, are not able to create it a second time…

On web servers, the web server logs can grow too large.

To remove Apache logs on Debian, Linux Mint, Ubuntu, Kali Linux and derivatives:

sudo rm -rf /var/log/apache2/*

To remove Apache logs on Arch Linux, BlackArch and their derivatives:

sudo rm -rf /var/log/httpd/*

In order for the server to start creating and writing to new log files, the Web Server service must be restarted.

Depending on the intensity of system usage, the accumulated logs can take up gigabytes. Depending on the system, the files may have different names, a more accurate analysis is recommended to be performed using the ncdu utility:

sudo ncdu /var/log/

4. Empty the trash

This tip is more for desktop systems. The files you deleted in the desktop GUI end up in the ~/.local/share/Trash/files/ folder, you can analyze them and delete them (second time) if you wish:

ncdu ~/.local/share/Trash/files/

5. Remove unnecessary kernel header source code files

The following is only relevant for Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives. Check the /usr/src/ folder, there will be subfolders like linux-headers-; most of them can be deleted – leave only the one whose number corresponds to the current kernel of the system – this is usually the most recent release number.

6. Remove orphaned packages

Orphaned packages are those packages (programs) that were installed as dependencies for other programs. But for various reasons, they are no longer needed: either the program that used them was removed, or for that program they ceased to be dependencies after updating the program.

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can remove unnecessary packages as follows:

sudo apt autoremove

For Debian and derivatives, the previous command is completely safe.

On Arch Linux and derivatives, the list of orphaned packages can be seen as follows:

pacman -Qdt

Before proceeding with their automatic removal, it is highly recommended to study this list!

To recursively remove orphans and their config files on Arch Linux and derivatives:

sudo pacman -Rns $(pacman -Qtdq)

If no orphaned packages were found, pacman will exit with an “error: no targets specified (use -h for help)”. This is expected since pacman -Rns took no arguments.

7. Clean up systemd logs

Over time, in some systems, the system logs begin to take up gigabytes on the hard drive. You can view the logs and free up space using the journalctl command.

To see how much space the logs are taking up, run:

journalctl --disk-usage

To remove all entries, leaving only entries per 100 megabytes, run:

journalctl --vacuum-size=100M

Or to delete all system log entries older than one week:

journalctl --vacuum-time=1weeks

8. Files in the /lost+found directory

The /lost+found directory contains files that were found after checking the disk file system. Typically, such checks are performed after a sudden reboot of the system or if there are signs of disk problems.

The files found are usually corrupted. Their goal is to save data that, if errors were corrected on the file system, would be completely lost.

The /lost+found folder may be empty (if there were no problems with the disk). If there are files there, then you can view them and, if desired, delete them.

9. Clean up PHP sessions

Sometimes web applications can create countless sessions due to a bug. Check the /var/lib/php/sessions/ directory for too many files.

(BONUS) 10. Analyze Docker Files

Don't mindlessly delete Docker files. I'm giving this directory as an example only because it caught my attention because of its sheer phantasmagoric size – and this despite the fact that I don't actually use Docker – I literally tried it several times to see what it is.

The largest folder is /var/lib/docker/overlay2/. To analyze disk space occupied, run:

sudo ncdu /var/lib/docker/

Conclusion

So, we have considered which files can be deleted from Linux with little or no loss of information. In addition to the directories discussed, which can be cleared both on a remote system with a web server and on a home computer, users with a graphical desktop should pay attention to such directories as:

  • ~/.cache
  • ~/.local
  • ~/Downloads (your downloaded files)

They do NOT need to be removed, but worth analyzing. For example, you may find out that the web browser on your computer has a cache of several gigabytes and that you can free them (it is recommended to do it using the web browser, rather than deleting files directly).

If I missed any directories with files that can be safely deleted, then write them in the comments!

Is it safe to remove configuration files left over from removed packages? (SOLVED)

What does the package status “[residual-config]” mean?

When searching the package repository using the apt utility, you may encounter programs that have a status like this instead of “installed” or not installed.

[residual-config]

See also: How to check if a package is installed on Linux Mint

There can be quite a lot of such files.

This raises the question: is it safe to delete such files, will this lead to unexpected failures in the programs? If these files can be removed, then how can this be done for all packages whose configuration files remain in the system at once?

apt autoremove”, as well as “apt clean” and “apt autoclean”, do not help to remove these files because the packages have already been removed.

Is it safe to delete settings files

To begin with, we note that if the package has the status “[residual-config]”, then it has already been removed and, therefore, cannot work. For this reason, deleting its configuration file will mean that if you want to install the same package in the future, you may need to configure the package again.

To display a list of packages that have been removed from the system, but for which configuration files remain, run the program:

dpkg -l | grep '^rc' | awk '{print $2}'

I ended up with a rather long list that didn't even fit on the screen. That said, most of the list is made up of packages that I never want to install again: previous versions of the kernel, previous versions of PHP, previous versions of the MariaDB server and client.

However, upon closer examination of the list, I found phpMyAdmin in it, which I installed and actually use. That is, this package was removed automatically, most likely during a major update of the PHP version. So not only do I not want to delete the phpMyAdmin config files, I re-installed the package. That is, do not rush to mindlessly remove the configuration files of missing packages – at least take a quick look at it.

Note that a package with the status “[residual-config]” is considered to be installed even if any of its files other than configuration files are missing. In a practical sense, this means that the dependencies of these already removed packages are still stored in the system. Therefore, after clearing the configuration files, the package is considered permanently removed. And this can lead to the fact that the dependencies that were installed automatically are no longer required. For this reason, launch

sudo apt autoremove

may cause packages to be removed.

This is usually not a problem as it removes automatically installed packages that are no longer needed by any of the programs. But if there are packages that are no longer needed, check the list of configuration files to clean up even more carefully – there may be something useful there, as in my case it was phpMyAdmin.

How much space will be freed up when clearing settings files

As for the question of how much this is necessary, users have different opinions. One user wrote that deleting the configuration files for 342 missing packages freed him up to just 2.6 MiB. Other users report that the configuration files filled up all the free space in the root directory. In fact, configuration files usually take up very little space and you shouldn't expect to free up a lot of disk space after deleting them.

Why settings files remain

This is not a mistake – the settings files of remote applications are saved intentionally. On Linux, installing a package from a repository can be done with a single command. But the subsequent setup, which may involve editing the configuration file, can take a long time. For this reason, the apt command has two kinds of program uninstalls:

remove

Removes packages. Note that when a package is removed, its configuration files remain on the system.

purge

purge is similar to remove except packages are removed and purged (any configuration files are also removed).

Thus, when you remove packages, usually using “sudo apt remove”, programs leave their configuration files on the system.

How to remove all configuration files for missing packages at once

To clear all configuration files, use the following command:

dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt --purge --yes remove

Do not forget to review the list of affected packages before running it, as shown above – it may turn out that, for reasons beyond your control, the packages you need were removed and you don’t want their configuration files to be removed at all.

While cleaning configuration files, you may encounter messages like:

dpkg: warning: while removing php7.3-cli, directory '/etc/php/7.3' not empty so not removed

Or:

rmdir: failed to remove '/lib/modules/5.10.0-kali4-amd64': Directory not empty

This means that these directories, in addition to the configuration files of the package, contain extraneous files. In all these cases, you need to remove the specified directories manually.

How to install Windows 11 without a Microsoft account

The Windows 11 and Windows 10 installer prompts you to create an online user account with Microsoft. Some functions of the operating system are tied to an online account, but many users prefer only an offline account. This guide will show you how to install Windows 11 without signing up for a Microsoft account.

How to install Windows 11 with a local account

The installation start is identical whether you want to use an online or offline account.

In the How would you like to set up this device step, select “Set up for personal use” and click the “Next” button.

In order not to create a Microsoft account, but to use an offline account, at the stage shown in the screenshot, scroll down and click “Sing-in options”.

Find and select “Offline account” option.

You will be persuaded, but click “Skip for now”.

Think of and enter a username.

Think up, remember and enter the password. If you want to log in to the computer without a password, then leave this field blank.

Do not rush to click “Next” at this stage.

Scroll through the list carefully – you may want to disable some/all options.

If you have disabled all options, then the “Next” button will change to “Accept”.

Loading...
X