Fixes, additional cleanup, etc

This commit is contained in:
Maxim Stewart 2020-05-03 21:46:47 -05:00
parent 807abb8003
commit 3da04365a7
6 changed files with 13 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
src/work/*
src/image/*
*.iso

View File

@ -27,7 +27,7 @@ RELEASE="focal"
# $ARCH is the target processor architecture.
# For old 32 bit x86 systems use i386.
# For newer 64-bit x86 systems (also known as x64, x86_64, Intel 64, and AMD64) use amd64.
ARCH="amd64"
ARCH=""
# the name of your distro and ISO
OS_NAME=""

View File

@ -1,20 +1,15 @@
# If we installed software, be sure to run
rm /var/lib/dbus/machine-id
# Before exiting the chroot, remove the diversion:
# Earlier this guide asked you to make a backup copy of /sbin/initctl.
# If the following command does not restore this file, then restore from the backup copy you made.
apt-get update && apt-get upgrade
apt-get autoremove --purge -y
apt-get autoclean -y
apt-get clean
rm /var/lib/dbus/machine-id
rm -rf /tmp/*
rm /etc/resolv.conf
rm /sbin/initctl
rm -rf /usr/src/* # Should be OK to clean this.
dpkg-divert --rename --remove /sbin/initctl
# Remove old kernels
# dpkg -l 'linux-*' | sed '/^ii/!d;/hwe/d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt -y purge; update-grub
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl

View File

@ -8,6 +8,7 @@
function main() {
sleep 2 # Used so we can see stub messages
clear;
start_menu_mesage;
read -p "--> : " ANSR

View File

@ -1,3 +1,6 @@
# Find which directories are consuming a lot of space.
du -hd 1 <your path> # -h means human readable; -d is depth
## Removes all packages but the ones specified and its dependencies
# !~nubuntu-minimal
aptitude markauto '~i !~nlinux-image-generic !~nubuntu-minimal !~nubuntu-standard !~ncasper !~nlupin-casper !~naptitude !~napt-get !~napt'

View File

@ -9,7 +9,8 @@
function main() {
clear;
if [[ $(sanity_check) -eq 1 ]]; then echo "\nExiting..."; return; fi
sanity_check
if [[ $? -eq 1 ]]; then echo "\nExiting..."; return; fi
start_menu_mesage;
read -p "--> : " ANSR