3

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?

marked as duplicate by user68186, vidarlo, karel, Eric Carvalho, ravery Feb 15 '18 at 10:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 '18 at 19:15
3

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 
  • Will doing this still let me use apt later if I need to? – Zephyr Feb 14 '18 at 18:01
  • 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. – Stephen Boston Feb 15 '18 at 17:19
1

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

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 or ask your own question.