Frequently Used Ubuntu Linux Keyboard Shortcuts on Raspberry Pi 400
While using Ubuntu Linux, you may encounter various issues caused by insufficient storage space.
Over time, the system may become slower, software updates may fail, or files may no longer be saved properly.
Ubuntu is designed to manage storage efficiently, but disk usage can increase gradually due to several factors:
Cached files created during system updates
Log files that grow continuously over time
Snap packages storing multiple revisions
Unused packages and dependencies left behind
Large user files accumulated in the home directory
These files often grow unnoticed until the system begins to show warning signs.
The first step in resolving low disk space issues is understanding the current storage situation.
Run the following command in a terminal:
df -h
This command displays total disk size, used space, and available space for each partition in a human-readable format.
![]() |
| df -h |
If the root (/) partition usage exceeds 90%, disk management is recommended.
To see which directories are consuming the most space:
du -h --max-depth=1 /
![]() |
| du -h --max-depth=1 / |
Pay special attention to directories such as:
/var
/home
/usr
These locations commonly contain files that grow over time.
Ubuntu stores downloaded package files locally to speed up installations and updates.
Over time, this package cache can occupy significant disk space.
sudo apt clean
This command removes cached package files and does not affect installed software.
sudo apt autoremove
This removes packages that were installed as dependencies but are no longer required.
It is especially useful after kernel updates.
Ubuntu keeps older kernel versions installed as a safety measure.
While useful, multiple old kernels can take up unnecessary disk space.
dpkg --list | grep linux-image
If several old kernels are installed, they may be candidates for removal.
![]() |
| dpkg --list | grep linux-image |
In many cases, running sudo apt autoremove is sufficient to clean up unused kernels safely.
Snap packages are widely used in Ubuntu and provide isolation and rollback capabilities.
However, Snap keeps multiple revisions of each application by default.
snap list --all
Disabled or older revisions can accumulate and consume disk space.
Reducing the number of retained Snap revisions can help manage disk usage over time.
This is more of a preventive approach than an immediate fix.
Ubuntu stores system logs in the /var/log directory. Even under normal conditions, logs are continuously generated and can grow large.
du -sh /var/log
journalctl --disk-usage
If logs occupy excessive space, configuring log retention limits can help prevent future disk shortages.
Most user-generated files are stored in the /home directory. Common space consumers include:
Large downloads
Old compressed archives
ISO images
Unused project or test folders
du -h ~/ | sort -h
This helps identify files or folders that may no longer be needed.
Applications create cache files to improve performance, but these can accumulate over time.
Examples include:
Web browser cache
Application temporary files
User cache directories (such as ~/.cache)
Periodically reviewing these locations can help reclaim storage without affecting system stability.
Low disk space often appears sudden, but it is usually the result of gradual accumulation.
Developing simple maintenance habits can prevent future problems:
Regularly check disk usage with df -h
Run autoremove after system updates
Review large downloads and temporary files
Monitor logs and cache directories
These practices contribute not only to disk health but also to overall system stability.
Low disk space issues on Ubuntu Linux should be addressed by understanding the system’s structure and identifying which components are using disk space.
While finding an immediate solution is important when storage problems occur, regularly checking and managing disk usage helps maintain a much more stable and reliable Ubuntu environment.