Search This Blog

2024/10/31

Ubuntu : How to clean up space from logs ?

Clean accumulated .deb files from /var/cache/apt/archives

Move .deb files to external drive
cd /var/cache/apt/archives
sudo mv *.deb /media/sangram/Elements/Ubuntu22.4LTSAPTArchieve/
ls -lh .

Run autoclean
sudo apt-get autoclean

Truncate System,Kernel & Auth Logs:
sudo truncate -s 0 /var/log/syslog
sudo truncate -s 0 /var/log/auth.log
sudo truncate -s 0 /var/log/kern.log

Remove Apt Cache:
sudo truncate -s 0 /var/log/apt/history.log
sudo truncate -s 0 /var/log/apt/term.log

cd /var/log/apt
sudo rm -rf *.gz
ls -lh /var/log/apt/

Restart rsynclog servicea
sudo systemctl restart rsyslog


Ubuntu : How to Upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS ?

Make sure your current system is fully up-to-date:
sudo apt update && sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove

Run the following command to make sure your upgrade tool is up-to-date:
sudo apt install update-manager-core

Begin the upgrade process by running:
sudo do-release-upgrade

Check for Available Upgrades:
sudo do-release-upgrade -d