7

I have a pretty small embedded system that has Linux on it for a project. Theres normally about 47% disk space used when I run df. However every time I start up the system that number gets bigger until it hits 100%.

I can get it back down by using apt-get clean, but I don't even want to update anything. My system is used in a limited capacity thats already working fine with what is on it, I don't want any upgrades of package updates.

How can I disable whatever apt is doing to check for updates and download stuff every time it starts up?

1
  • 1
    For a storage-limited embedded system, look at Ubuntu Core, which is a flavor of Ubuntu designed specifically for your use case and lacks apt entirely. Use snaps for upgrades.
    – user535733
    Feb 14, 2018 at 19:15

3 Answers 3

9

On my systems I did the following to take control on the system:

  1. I removed unattended-upgrades package

    sudo apt-get purge unattended-upgrades
    
  2. Disabled systemd timers, which are related to APT:

    sudo systemctl disable apt-daily-upgrade.timer
    sudo systemctl disable apt-daily.timer
    
  3. Disabled 'APT::Periodic' for sure:

    echo 'APT::Periodic::Enable "0";' | \
    sudo tee /etc/apt/apt.conf.d/99periodic-disable
    

With these steps I take full control on APT. I have never seen lock-conflicts.

1
  • Comments indicate that systemctl stop is more thorough than systemctl disable, and that disable --now will both stop it now and disable it in future boots: serverfault.com/q/878106 Aug 24, 2023 at 16:45
4

I removed update-manager and this stopped the automatic updating.

 sudo apt remove update-manager

This action removed

ubuntu-release-upgrader-gtk
update-notifier 
update-manager 
3
  • Will doing this still let me use apt later if I need to?
    – Zephyr
    Feb 14, 2018 at 18:01
  • 2
    This does not affect apt at all. The update manager uses apt but apt does not use the update manager. You will be able to use apt to install, update, remove any package you like. You will also be able to perform a general update or upgrade using apt update and apt upgrade. Feb 15, 2018 at 17:19
  • Another answer indicates that this is only a partial solution: askubuntu.com/a/1322357/80644 Aug 24, 2023 at 16:27
1

It sounds that you have to run

sudo apt autoremove

to remove old kernels.

Do that before the disk usage hits 100%, do it frequently.

If you disable updates or remove the update-manager, you would have to keep the system up to date manually. You would still be able to use apt for that purpose.

In addition you should check which files/folders are eating your disk space. The answers in How to determine where biggest files/directories on my system are stored? might be useful.

Not the answer you're looking for? Browse other questions tagged .