# Help! Partition full

**URL:** <https://discourse.ubuntubudgie.org/t/help-partition-full/7295>\
**Category:** General\
**Created:** [July 23, 2024, 10:06pm UTC](https://discourse.ubuntubudgie.org/t/help-partition-full/7295 "2024-07-23T22:06:31Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![jlb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.ubuntubudgie.org/jlb/32/4919_2.png) [@jlb](https://discourse.ubuntubudgie.org/u/jlb)\
**Post date:** [September 24, 2024, 6:49am UTC](https://discourse.ubuntubudgie.org/t/help-partition-full/7295/17 "2024-09-24T06:49:03Z")

</div>

> [@Dusty](#):
>
> Can anyone tell what I installed that needed KDE?

I don’t see it, @Dusty : even after installing ‘kshisen’, I don’t have that many ‘kde’ files…  
But I think you should at least clean up the snaps.

Try this maintenance routine I use regularly, which also does this.  
Enter this line, copy and paste the code and save the file:

```auto
sudo gedit /usr/local/bin/maintenance-routine.sh

```

```auto
#!/bin/bash
# Run periodically to keep your system lean and up to date

# Clears the APT cache, deletes archived logs (older than seven days) and thumbnails.
#
sudo apt clean && sudo journalctl --vacuum-time=7d && sudo rm -rf ~/.cache/thumbnails/*

# Removes any remaining configuration.
#
sudo apt purge ~c -y

# After updating the list of packages and the system, remove any packages that are no longer required.
#
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove --purge -y && sudo apt autoclean -y

# Removes old versions of snaps and flatpaks.
#
set -eu
snap list --all | awk ‘/disabled/{print $1, $3}’ |
    while read -r snapname revision; do
        sudo snap remove ‘$snapname’ --revision="$revision’
    done
    
flatpak uninstall --unused  

read -p ‘<Enter> to exit’

```

Make it executable:

```auto
sudo chmod +x /usr/local/bin/maintenance-routine.sh

```

Finally, run the script:

```auto
maintenance-routine.sh

```

If this works for you, edit ‘~/.bashrc’:

```auto
gedit .bashrc

```

Then add `alias mr='maintenance-routine.sh'` to the end of file and save.

A little ‘mr’ from time to time will keep your system lean and mean.

To delete it:

```auto
sudo rm /usr/local/bin/maintenance-routine.sh

```

---

_[View the full topic](https://discourse.ubuntubudgie.org/t/help-partition-full/7295)._
