In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to release space in Ubuntu. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
How do I check the available space on a Ubuntu system?
Use the df command on your system to check the current disk utilization.
$df-hFilesystem Size Used Avail Use% Mounted onudev 975M 0975M 0% / devtmpfs 200M 1.7M 198M 1% / run/dev/sda1 30G 16G 13G 55% / tmpfs 997M 0997M 0% / dev/shmtmpfs 5.0M 4.0K 5.0M 1% / run/locktmpfs 997M 0997M 0% / sys/fs/cgroup
Graphical interface users can use the disk Utilization Analyzer tool to view the current utilization.
1) remove packages that are no longer needed
The following command removes dependent libraries and packages that are no longer needed by the system. These packages are installed automatically so that an installed package meets the dependency. Similarly, it removes the old Linux kernel installed on the system. It removes orphan packages that are no longer needed by the system, but does not clear them.
$sudo apt-get autoremove [sudo] password for daygeek:Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages will be REMOVED: apache2-bin apache2-data apache2-utils galera-3 libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libjemalloc1 liblua5.2-0 libmysqlclient20 libopts25 libterm-readkey-perl mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common sntp socat0 upgraded, 0 newly installed, 25 to remove and 23 not upgraded.After this operation, 189 MB disk space will be freed.Do you want to continue? [Y/n]
To clear them, you can use the-- purge option with the command.
$sudo apt-get autoremove-purgeReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages will be REMOVED: apache2-bin* apache2-data* apache2-utils* galera-3* libaio1* libapr1* libaprutil1* libaprutil1-dbd-sqlite3* libaprutil1-ldap* libconfig-inifiles-perl* libdbd-mysql-perl* libdbi-perl* libjemalloc1* liblua5.2-0* libmysqlclient20* libopts25* libterm-readkey-perl* mariadb-client-10.1* mariadb-client-core-10.1* mariadb-common* mariadb-server-10.1* mariadb-server-core-10.1* mysql-common* sntp* socat*0 upgraded 0 newly installed, 25 to remove and 23 not upgraded.After this operation, 189 MB disk space will be freed.Do you want to continue? [YPo] 2) empty the Recycle Bin
It is possible that there is a lot of useless data in your recycle bin. It will take up your system space. One of the solutions is to clean up the useless data on your system to get some free space.
To clean up these, simply use the File Manager to empty your Recycle Bin.
3) Clean up APT cache files
Ubuntu uses APT commands (advanced package tools) for package management, such as installation, removal, search, and so on.
In general, Linux operating systems keep buffer files for downloaded and installed software packages in their respective directories.
The same goes for Ubuntu, which buffers every update it downloads and installs on your disk. Ubuntu keeps the buffer file for the DEB package in the / var/cache/apt/archives directory. Over time, these caches may grow rapidly and take up a lot of space on your system.
Run the following command to check the usage of the current APT cache file.
$sudo du-sh / var/cache/apt147M / var/cache/apt
The following command cleans up outdated deb packages. I mean, it's not clean at all.
$sudo apt-get autoclean
The following command removes all packages in the apt cache.
$sudo apt-get clean4) Uninstall unused applications
This requires you to check the packages and games installed on your system and delete them if you rarely use them.
This can be done simply through the Ubuntu Software Center.
5) Clean the thumbnail cache
The cache folder is the place where programs store the data they may need again, and it is reserved for speed, not necessary. It can be generated again or downloaded again. If it really fills up your hard drive, you can delete something without having to worry.
Run the following command to check the utilization of the current APT cache.
$du-sh ~ / .cache/thumbnails/412K / home/daygeek/.cache/thumbnails/
Run the following command to remove them from your system.
$rm-rf ~ / .cache / thumbnails/* above is how to free up space in the Ubuntu shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.