Linux: fix it yourself
The commands below are for Ubuntu, Linux Mint, Debian and other systems that use apt. Fedora and similar systems use dnf in place of apt; the logs and disk checks are the same everywhere. Back up your home folder first if the system still starts.
Updates fail or packages are broken
Open a terminal and run these in order:
sudo dpkg --configure -afinishes any interrupted installation.sudo apt --fix-broken installrepairs missing dependencies.sudo apt update && sudo apt full-upgradebrings everything up to date.
The disk is full
df -hshows which partition is full.sudo apt autoremove --purgeandsudo apt cleanremove old kernels and downloaded packages.sudo journalctl --vacuum-time=14dtrims old logs.sudo du -xh --max-depth=1 / | sort -hlists the largest folders so you can see where the space went.
The system will not boot
- Show the GRUB menu: hold Shift, or tap Esc, as the computer starts.
- Choose Advanced options and pick the previous kernel. If that boots, the newest kernel or a driver is the problem.
- The recovery mode entry offers a menu with a file system check and a package repair.
- Black screen after an update? In GRUB press e, add
nomodesetto the end of the line beginning with linux, and press Ctrl + X. This is a one-off test, not a fix; reinstall the graphics driver once you are in.
Read what went wrong
journalctl -b -p errlists errors from this boot; add-b -1for the previous one.systemctl --failedlists services that did not start.sudo dmesg --level=err,warnshows hardware and driver warnings.
Check the drive and the memory
- Install smartmontools, then run
sudo smartctl -a /dev/sda(or/dev/nvme0). Reallocated or pending sectors above zero mean the drive is failing: back up now. - Repair a file system only when it is not mounted. Start from a live USB, find the partition with
lsblk -f, then runsudo fsck -fon it. Never run fsck on a mounted partition. - For random freezes, run the memory test from the GRUB menu, or from a MemTest86+ USB stick, for at least one full pass.
No Wi-Fi
rfkill listshows whether Wi-Fi is blocked;sudo rfkill unblock allclears a soft block.nmcli device statusshows whether the adapter is seen at all.sudo systemctl restart NetworkManagerrestarts networking.
Rescue your files with a live USB
If the system will not start at all, boot the installer USB and choose the Try option. Your internal drive appears in the file manager, and you can copy your home folder to an external drive before you reinstall.
When to stop and call us
- smartctl reports a failing drive, or the drive is not listed by
lsblk - The memory test shows errors
- The computer does not reach GRUB or shows nothing on screen
Tell us what you found. Advice by phone and email is free.