Slight problem with Ubuntu

By uthus2000 | uthus2000 | 1 Apr 2021


 

I'd never realized that the Ubuntu logo is 3 people in a circle holding hands while looking up until I started writing this.

I've got a slight problem. Well, it's more of an annoyance than a problem.

I'm running Ubuntu 20.4.2 LTS on a HP Stream. It has a relatively small 32GB eMMC drive.

I know that this thing was designed to save all your information "on the cloud" rather than locally. (Who decided to start calling server farms a cloud?)

Almost every day I get messages saying my drive is getting full. I found a script to clean up some things, but I have to open a term window to do everything else.

This script gets rid of old snaps (whatever they are).

##!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu

LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
        snap remove "$snapname" --revision="$revision"
    done

 

Since this is executable in /home/username/bin, I run it like so:

me:~$ cd bin 
me:~/bin$ sudo ./remove-old-snaps

Then I follow up with:

me:~/bin$ cd /var/log
me:~/var/log$ sudo rm *.gz
me:~/var/log$ sudo rm syslog ; sudo touch syslog ; sudo chmod +640 syslog
me:~/var/log$ cd journal/ ; sudo rm -r *
me:~/var/log/journal$ sudo reboot

If I were running Slackware, I'd just write a script called mycleanup.sh or something and call it from /etc/rc.d/shutdown.

But since Ubuntu and most other distributions use the non-POSIX format of rc*.d, I don't quite know how to do it.

I don't particularly like Ubuntu. It has too much overhead. I'd much prefer to be running Slack current with WindowMaker as my manager using Gnome and KDE libs, but when I installed this, Slackware had not implemented eMMC support without a patch.

Any ideas?

Note: I've got no idea why the text colors are like they are.

How do you rate this article?

13


uthus2000
uthus2000

I'm a beekeeper electrician in a great small town in a terrible state.


uthus2000
uthus2000

Small town life and observations in the mid-west.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.