Easy Linux Tips Project How To Clean Linux Mint Safely
Easy Linux Tips Project How To Clean Linux Mint Safely
Easy tips for Linux Mint and Ubuntu, both for beginners and for advanced users.
Thanks in advance....
As the Victorians used to say: cleanliness is next to godliness. So here are some tips to
Search This Website
make your Linux Mint 20.2 even more divine.
• 13. Want to get rid of polluted settings in your web browser? • 10 Things to Do First in Linux
Mint 20.2 Uma
• 14. More tips?
1 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
2. Another cleaning pitfall is this: by default, there are two microcode packages installed in • Avoid 10 Fatal Mistakes in Linux
Mint and Ubuntu
your system: one for Intel CPU's and one for AMD CPU's. Don't remove the one you don't
need! • Security in Linux Mint and
Ubuntu: an Explanation and
Some Tips
Both microcode packages are installed as dependencies of the kernel metapackage, so
• Wireless security: four popular
removing one or the other will also remove that metapackage. The other microcode will myths and 12 tips
become a candidate for auto-removal, and future kernel updates will not be offered
• How to solve internet
correctly. connection problems
• Donate and get two free
OK, now that's out of the way, let's get started: goodies!
Linux Mint doesn't get polluted much over time. It doesn't even need defragmentation. The
only cleansing actions you might want to do in Linux Mint, are the following:
Over time, the number of thumbnails can increase a lot, up to 512 MB. Moreover, the
thumbnail cache will eventually contain many superfluous thumbnails of pictures that don't
exist anymore. By default, only thumbnails older than six months will be deleted.
The quickest way to get rid of all the thumbnails is to use the terminal for deleting the folder
in which they reside. No worries: the system will re-create that folder and its subfolders
automatically, the next time that thumbnails will be generated. Proceed like this:
Press Enter.
Note: this will probably affect the thumbnails on your desktop as well; in that case it
should suffice to simply log out and in again (or reboot your computer), which will
create them anew.
2 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
Do you wish to change the settings for thumbnails, so that their maximum size and age are
reduced? Then proceed like this (only tested in Cinnamon yet):
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible,
not even dots will show when you type it, that's normal. In Mint this has changed: you'll see
asterisks when you type. Press Enter again.
dconf-editor • Home
• 40 Tips and Tweaks for Linux
Press Enter. Mint - PART ONE
• 40 Tips and Tweaks for Linux
Expanding the subitems can be done by clicking on the little triangle before an item. In Mint - PART TWO
Cinnamon, click your way to: org - cinnamon - desktop - thumbnail-cache • System hacks for advanced
Linux Mint users
(in MATE: org - mate - desktop - thumbnail-cache)
• 45 Frequently Asked Questions
about Linux Mint: PART 1
Click once on maximum-age and then once on 180, and change it to 90 (for example, if
you want 90 days as maximum age). • 45 Frequently Asked Questions
about Linux Mint: PART 2
Then click once on maximum-size and then once on 512, and change it to 128 (for
example, if you want 128 MB as maximum size). Repeat this in each user account. That
way, you won't have to pay attention to the disk space of the thumbnails anymore.
The registry
4. There's no need to clean the registry of Linux, as it can't get polluted in the first place.
For the following reasons:
- Only the operating system itself has a central registry. The configurations of the
applications aren't in there, because they don't have access to it. So they can't mess it up.
They place their own default settings in their own folders in the system.
- Applications place upon installation a hidden settings file in the personal folder of each
user. That's the only settings file that a user has access to. More or less like MS-DOS did,
when each application only created its own .ini file with its settings.
- Each user has his own hidden copy of the central registry in his personal folder. That copy
is the only thing that he can mess up, not the registry of another user account.
The price you pay is a small decrease in user friendliness, but it's not much. The privacy
gain is huge, and outweighs this price by far.
3 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
Firefox menu button (with the three horizontal dashes on it) - Preferences - tab Privacy &
Security
c. Then, click the button Settings... (on the right of "Clear history when Firefox closes") and
tick everything, except for Site Preferences. Click OK.
f. Item Tracking protection: leave those settings at their defaults, because otherwise
some websites might function less well.
You've just set all cookies to be thrown away automatically upon closing Firefox (in the
previous steps), so this tracking doesn't impact your privacy by much anyway!
g. Close the Preferences tab and you're done with optimizing the settings for privacy.
Tip: sometimes it may come in handy to force a cleansing during your web browsing.
Simply by closing Firefox and launching it anew.
This use of disk space can also increase quickly, because many Flatpaks are being
updated very regularly. This frequent updating also causes a lot of data traffic.
So if you don't have much disk space or have to limit your data traffic, you might want to
remove all installed Flatpaks and even the Flatpak infrastructure. Like this:
a. First launch Software Manager. Then click the Flatpak button (bottom right) and see
which applications have a green circle with a white checkmark in it, after their name. Those
are the installed Flatpaks. Remove them all.
c. You might wish to remove the Flatpak infrastructure as well, in order to prevent installing
new Flatpaks by accident. Because Software Manager isn't very clear in showing the
distinction between ordinary applications and Flatpaks....
e. Copy/paste the following command line into the terminal, in order to avoid typing errors:
Press Enter. Type your password when prompted. Press Enter again.
4 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
Note: to be on the safe side, only remove redundant snapshots within the Timeshift
application itself. Don't use your file manager for that job! Then you can be sure that the
remaining snapshots stay consistent.
Removing old snapshots is probably only safe through Timeshift itself. This will take
a while to process though. That's because Timeshift needs to make sure that the files that
have not been altered and are still needed, are preserved during the removal of the old
snapshots.
Practically nobody needs to have more than two snapshots for repairing a broken system.
If you wish to automate the creation of snapshots, select a monthly interval with a retention
of 2. No more.
There's no need to worry about which Timeshift snapshots you delete or in what
order. Not even the very first snapshot needs to be kept; removing it won't affect the
remaining snapshots.
The technical explanation is: although Timeshift snapshots are incremental in order to save
storage space, each individual snapshot is still fully complete and independent from the
other snapshots.
That looks like a contradiction, but it's not: Timeshift achieves this by using an advanced
feature of the Linux file system (hard links, to be exact). The consequence is that
snapshots can always safely be removed in any order.
To use an imperfect but helpful analogy, think of it like this: Timeshift's snapshot system
behaves as if it consists of two components. Namely (1) a virtual "local software
repository" with a copy of all your system files and (2) lists of those system files at
particular points in time (namely the times at which the snapshots were made).
Important to know: each file is copied only once. So, your first snapshot will be roughly the
same size as the entire system, which means that it's pretty big....
The next snapshot requires space only for its new file list (which is technically a series of
hard links) and any additional new files (including updated versions of existing files).
Because Timeshift's virtual "local software repository" belongs to all snapshots, you can
delete the snapshots in any order. Without ever impairing the integrity of the remaining
snapshots.
A file is only removed from Timeshift's virtual "local software repository", when all
snapshots with that particular file on their lists are deleted. Which means of course, that
only deleting all snapshots will also delete all contents of the virtual "local software
repository".
And it also means that no more than one single snapshot, no matter which one it is, no
5 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
matter how old or how recent it is, is enough for restoring the system.
(based on the fine explanation given by forum members slipstick, pbear, rene and gm10 on
forums.linuxmint.com)
Note: the above explanation of the workings of Timeshift is only valid for the normal default
EXT4 filesystem. If you have selected BTRFS instead, then that's quite a different cup of
tea which falls outside the scope of my website.
When you're running out of disk space: it makes sense to wipe all existing snapshots from
time to time, except for two. Why two? Well, it's an advantage to have one extra snapshot
that's at least a month old. Namely in case the system damage you wish to repair by
restoring a snapshot, was inflicted before the latest snapshot (which would mean that the
latest snapshot contains that damage as well).
In case of automatic snapshots, limit the number of kept snapshots to two. Make them with
a monthly interval; more frequent than that is usually nonsensical.
Barring the rare exception, nobody needs more than two snapshots. Even if the snapshot
you restore is quite old: simply run Update Manager after the restoration and your system
will be up to date in almost no time at all.
Also, make sure that Timeshift stores its snapshots on a dedicated storage partition on
your hard drive or even on an external hard drive. That way, your system won't ever run
out of disk space because of Timeshift.
Proceed as follows:
From the menu, launch Timeshift. In the panel of Timeshift: Settings - Location
Select the dedicated storage partition you wish to use for this.
Note (1): The partition you select needs to be formatted as a Linux partition, so FAT32 or
NTFS won't do. A partition formatted as EXT4 is the best option.
Note (2): When your system has become unbootable, you'll need to restore a Timeshift
snapshot from within the Live session, after booting from the Mint DVD / USB stick.
In that Live session you'll probably need to begin by telling Timeshift in its Settings (section
Location) on which disk the stored snapshots are ("which location to use for snapshots"),
before you can restore one of them. You probably won't be able to select a snapshot by
using the Browse button in the Timeshift toolbar (which is an unfortunate usability bug).
Note: sometimes, removing fonts may have unwanted side effects! Although I haven't
experienced those on my machines yet after the removal of the Asian fonts described
below, it's something to keep in mind....
b. Copy/paste the following command line into the terminal, in order to avoid typing errors.
It's one huge line:
6 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible,
not even dots will show when you type it, that's normal. In Mint this has changed: you'll see
asterisks when you type. Press Enter again.
c. Just to make sure, follow it up with this terminal command (use copy/paste to transfer it
to the terminal):
Press Enter.
Finally: I strongly advise to leave it at that. Don't remove any other fonts, because of the
aforementioned risk of negative side effects!
After a kernel update, the old kernel still shows in the Grub boot menu, under the header
Advanced options for Linux Mint. Because you might want to start your machine with the
old kernel, if the new kernel doesn't function well....
So far, so good. But having more than one redundant kernel is superfluous and a waste of
disk space, because each kernel uses up more than 200 MB (headers included). Below I
describe various ways how you can remove old kernels and thereby clean up the Grub
boot loader menu as well.
Note: don't use cleaning applications like Bleachbit or Computer Janitor for this job! They
are dangerous and at best superfluous.
a. Launch Update Manager. In the toolbar of Update Manager: View - Linux kernels
This may take some time. Then a warning window pops up. Ignore it and click "Continue"
in order to proceed.
b. Press the button Remove Kernels... You should then get to see a list of all removable
old kernels.
Note: I strongly recommend not to throw away all of them: leave at least one spare kernel
installed. You never know when such a spare kernel might come in handy, for example
when your currently active newer kernel suddenly starts misbehaving....
a. Launch Update Manager. In the toolbar of Update Manager: View - Linux kernels
This may take some time. Then a warning window pops up. Ignore it and click "Continue"
in order to proceed.
7 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
b. Ignore the button labeled Remove Kernels... , because that button is meant for mass
removal. Just click on the kernel that you want to throw away. Then click on the "Remove"
button.
Note: I strongly recommend to leave the latest redundant old kernel in your system, just to
be on the safe side! It never hurts to have a spare kernel that's known to work well....
It's a safe tool to use and smart as well, because it leaves the latest redundant old kernel in
your system, just to be on the safe side. It's wise to have one spare kernel that's known to
work well...
Finished! That's all you ever need to do. Doing more is risky and not advisable.
b. First you're going to reduce their current size well below 100 MB, which should be more
than enough in almost all circumstances. For that one-time action, copy/paste the following
command line into the terminal, in order to avoid typing errors:
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible,
not even dots will show when you type it, that's normal. In Mint this has changed: you'll see
asterisks when you type. Press Enter again.
c. When that one-time job is done, you're going to put a permanent cap of seven log files
on the logs. Which equals seven boot procedures.
For setting the cap, copy/paste the following command line into the terminal, in order to
avoid typing errors. It's one big line:
Press Enter.
You're done!
8 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
11. Besides taming the logs of systemd, as described in item 10 on this page, you can also
reduce some other system logs. Under normal circumstances this won't free up nearly as
much disk space as taming the systemd logs, but it's always fun to restrict the system log
files to a sensible minimum....
Proceed as follows:
b. First you're going to delete current system logs. For that one-time action, copy/paste the
following command line into the terminal, in order to avoid typing errors:
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible,
not even dots will show when you type it, that's normal. In Mint this has changed: you'll see
asterisks when you type. Press Enter again.
c. Now you're going to reduce the number of kept logs to 1, for two types of logs, in the
settings file rsyslog. For the first log type, copy/paste the following command line into the
terminal, in order to avoid typing errors:
Press Enter.
Then copy/paste this command into the terminal for the second log type:
Press Enter.
d. Then you're going to set the log rotation for rsyslog to daily instead of weekly. Log
rotation simply means starting afresh; you're going to configure your system to start each
day with a new empty log, thus limiting its potential size. Proceed like this:
Copy/paste the following command line into the terminal, in order to avoid typing errors:
Press Enter.
e. Now you're going to reduce the number of kept logs to 1, in another settings file
named logrotate.conf. Copy/paste the following command line into the terminal, in order to
avoid typing errors:
Press Enter.
f. Then you're going to set the log rotation in logrotate.conf to daily instead of weekly.
Copy/paste the following command line into the terminal, in order to avoid typing errors:
Press Enter.
You're done!
9 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
look at its logs, so it won't hurt to turn off all logging by the firewall. Especially because it
can be rather spammy sometimes. Turning off its log can be done like this:
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible,
not even dots will show when you type it, that's normal. In Mint this has changed: you'll see
asterisks when you type. Press Enter again.
a. First make a backup of your current web browser settings (because you never know why
you might need them sometime):
- Use copy/paste to transfer the following blue command line to the terminal:
For Firefox:
cp -r -v ~/.mozilla ~/.mozillabackup
Press Enter.
For Chrome:
cp -r -v ~/.config/google-chrome ~/.config/google-chromebackup
Press Enter.
For Firefox:
Click the "Library" button (the one with the four bars) - Bookmarks - Show All Bookmarks
(down below)
Later on, you can import your bookmarks again in a clean Firefox.
For Chrome:
On the upper right in your browser window, click on the three dots - Bookmarks - Bookmark
manager
Later on, you can import them again in your clean Chrome.
10 de 11 10/03/21 19:12
Firefox https://easylinuxtipsproject.blogspot.com/p/clean-mint.h...
c. You will also lose all of your stored login passwords for websites! Make sure you know
them all.
f. Copy/paste the following blue command line into the terminal, in order to avoid typing
errors:
For Firefox:
rm -r -v ~/.mozilla && rm -r -v ~/.cache/mozilla
Press Enter.
For Chrome:
rm -r -v ~/.config/google-chrome && rm -r -v ~/.cache/google-chrome
Press Enter.
h. Import your old bookmarks from the backup you've created. Importing can be done by
means of the same feature as the one you've used for exporting.
You're done! From now on, avoid all shady add-ons and extensions, and install only those
that you really need and trust.
More tips?
Do you want more tips and tweaks? There's a lot more of them on this website!
For example:
Disclaimer
Home
11 de 11 10/03/21 19:12