I have installed Ubuntu 22.04 LTS on my PC for a few days. Since I have the main purpose for which I did it is both for university and personal reasons (I want to learn as much as possible about Linux in general) I will go often and willingly to install packages/repositories/applications etc... and this can lead to some instability/incompatibility or worse, a system crash... To avoid having to format the hard disk from scratch again and reinstall Ubuntu, is there a way to check that the system doesn't get corrupted? I already use time-shift but I would also like to use some tools that help me maintain the integrity of the OS, like SFC /SCANNOW which is used on windows and other terminal commands. Thank you all!
3 Answers
A short answer to this:
- Do not install by other means than
apt
(different tools: dpkg, aptitude, synaptic - also uses the same .deb files).
OR possibly snap (a big disklike from me).
These are almost(?) always, easy and clean to remove:
sudo apt purge package-name
orsudo snap remove package-name
. - default settings at least up to Ubuntu 20.04 may allow e.g.
/boot
to fill up completely,
look for installed kernel items, as shown bydpkg --list | grep -E ^ii.*kernel
-
dosudo apt purge package-name
on those you will not ever use. - do
sudo apt update && sudo apt upgrade
periodically, unless you have enabled automatic updates.
And one more thing: Avoid "updating" Python, it will bring havoc to your Ubuntu - unless it is provided via an update, or you know exactly how to avoid havoc: generally; "expert" knowledge required.

- 5,374
- 1
- 23
- 40
Do your experimenting in a virtual machine, so their inevitable meltdowns don't affect your Host OS.
Several VM applications are in the Ubuntu repositories. Try any of them.

- 62,253
There is no general way to check that Ubuntu doesn't get corrupted because there are too many possible ways to corrupt it. The real problem is how to prevent Ubuntu from getting corrupted in the first place by engaging in proper package management practices. Ubuntu has two reliable sources of software installed by default, apt and snap. All the other software sources including PPAs, downloading software from the internet, and compiling software from source code are less reliable and sources of potential package management errors.
Other methods of preventing package management errors include running Python applications inside a virtual Python environment, running untrusted software inside an Ubuntu guest OS in a virtual machine, and using the --simulate
option of apt to simulate the installation or removal of a package without actually installing or removing it. A detailed explanation of the --simulate
option of apt in action is given in this answer.

- 114,770