Skip to content
Monday to Saturday, 9am to 6pm 020 7237 6805
Get a quote

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:

  1. sudo dpkg --configure -a finishes any interrupted installation.
  2. sudo apt --fix-broken install repairs missing dependencies.
  3. sudo apt update && sudo apt full-upgrade brings everything up to date.

The disk is full

  1. df -h shows which partition is full.
  2. sudo apt autoremove --purge and sudo apt clean remove old kernels and downloaded packages.
  3. sudo journalctl --vacuum-time=14d trims old logs.
  4. sudo du -xh --max-depth=1 / | sort -h lists the largest folders so you can see where the space went.

The system will not boot

  1. Show the GRUB menu: hold Shift, or tap Esc, as the computer starts.
  2. Choose Advanced options and pick the previous kernel. If that boots, the newest kernel or a driver is the problem.
  3. The recovery mode entry offers a menu with a file system check and a package repair.
  4. Black screen after an update? In GRUB press e, add nomodeset to 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 err lists errors from this boot; add -b -1 for the previous one.
  • systemctl --failed lists services that did not start.
  • sudo dmesg --level=err,warn shows 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 run sudo fsck -f on 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

  1. rfkill list shows whether Wi-Fi is blocked; sudo rfkill unblock all clears a soft block.
  2. nmcli device status shows whether the adapter is seen at all.
  3. sudo systemctl restart NetworkManager restarts 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.

Get a quote

Tell us the make, the model and what is going wrong. We reply as soon as we can. See our prices.

Send an enquiry Call 020 7237 6805

020 7237 6805

info@creativeit.net

Monday to Saturday, 9am to 6pm

Creative IT (UK) Ltd
Unit 1, The Willows, 80 Willow Walk
London SE1 5SY

Get directions