A computer-implemented method of synchronizing content items comprising: receiving, from a client device , a measure of activity; determining, by a content management system , an idle state based on the measure of activity; responsive to determining, by the content management system , that the client device is idle and that a retention state for a shared content storage directory on the client device violates predetermined retention state criteria, the retention state comprising content items in the shared content storage directory and a set of attributes for the content items, the predetermined retention state criteria specifying a maximum storage amount allowed in the shared content storage directory : identifying, by the content management system , one or more actions that when performed on the shared content storage directory will produce a retention state for the shared content storage directory that satisfies the predetermined retention state criteria; and requesting, by the content management system , that the client device perform the one or more identified actions on the shared content storage directory ; wherein identifying the one or more actions comprises: computing an excess storage amount based on a total storage amount used by the shared content storage directory on the client device and the maximum storage amount allowed; identifying one or more content items stored in the shared content storage directory on the client device such that a total size of the identified content items is greater than or equal to the excess storage amount; and replacing the identified one or more content items with corresponding shadow items as the one or more actions. receiving, from a client device , a measure of activity; determining, by a content management system , an idle state based on the measure of activity; responsive to determining, by the content management system , that the client device is idle and that a retention state for a shared content storage directory on the client device violates predetermined retention state criteria, the retention state comprising content items in the shared content storage directory and a set of attributes for the content items, the predetermined retention state criteria specifying a maximum storage amount allowed in the shared content storage directory : identifying, by the content management system , one or more actions that when performed on the shared content storage directory will produce a retention state for the shared content storage directory that satisfies the predetermined retention state criteria; and requesting, by the content management system , that the client device perform the one or more identified actions on the shared content storage directory ; wherein identifying the one or more actions comprises: computing an excess storage amount based on a total storage amount used by the shared content storage directory on the client device and the maximum storage amount allowed; identifying one or more content items stored in the shared content storage directory on the client device such that a total size of the identified content items is greater than or equal to the excess storage amount; and replacing the identified one or more content items with corresponding shadow items as the one or more actions. computing an excess storage amount based on a total storage amount used by the shared content storage directory on the client device and the maximum storage amount allowed; identifying one or more content items stored in the shared content storage directory on the client device such that a total size of the identified content items is greater than or equal to the excess storage amount; and replacing the identified one or more content items with corresponding shadow items as the one or more actions. <EOS>