8

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?

Zephyr
  • 319

3 Answers3

10

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.

N0rbert
  • 103,263
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 
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.

mook765
  • 18,644