Slight problem with Ubuntu

uthus2k(59)
Published in
#life
Words
223
Reading
1 min
6y
Listen to this post
~1 min

Screenshot from 2021-03-31 19-43-14.png

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?

Slight problem with Ubuntu | Ecency